crawl4ai icon indicating copy to clipboard operation
crawl4ai copied to clipboard

[Bug]: light_mode=False not working

Open thibaud57 opened this issue 2 months ago • 1 comments

crawl4ai version

latest

Expected Behavior

light_mode=False navigator is dark mode

Current Behavior

Hello i'm running wth config config = BrowserConfig( headless=False, light_mode=False, enable_stealth=True, headers={ "Accept-Language": "fr-FR,fr;q=0.9", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8", }, viewport_width=1920, viewport_height=1080, )

        light_mode=False,

I can see the browser light but when i open console it switch black

other params run_config = CrawlerRunConfig( cache_mode=CacheMode.DISABLED, magic=True, simulate_user=True, override_navigator=True, page_timeout=60000, wait_for="css:.pIav2d", delay_before_return_html=3.0,

Is this reproducible?

Yes

Inputs Causing the Bug


Steps to Reproduce


Code snippets


OS

windows

Python version

latest

Browser

No response

Browser version

No response

Error logs & Screenshots (if applicable)

No response

thibaud57 avatar Nov 21 '25 23:11 thibaud57

@thibaud57 I’ve opened a PR to resolve this issue: #1633 It fixes the problem where light_mode=False did not apply dark mode correctly. I fixed the issue where light_mode=False didn’t enable dark mode. Refactored BrowserConfig (renamed to performance_mode, added dark_mode), updated browser_manager.py to apply color_scheme='dark', added a dark mode test, verified with pytest, and cleaned up temporary test files. Looking forward to feedback and review.

03ShreyanshGoel avatar Nov 22 '25 16:11 03ShreyanshGoel

Hi, the light_mode parameter is there to disable background processes, extensions, and other unnecessary features, making the browser more efficient. It's not for the dark and light modes of the browser

ntohidi avatar Dec 03 '25 11:12 ntohidi

I will go ahead and close the issue, but please feel free to continue the conversation! :)

ntohidi avatar Dec 03 '25 11:12 ntohidi