[GH-ISSUE #934] [FEATURE] Allow simple append to official style with WHOOGLE_CONFIG_STYLE instead of overwriting it #580

Closed
opened 2026-02-25 20:36:04 +03:00 by kerem · 0 comments
Owner

Originally created by @DUOLabs333 on GitHub (Jan 22, 2023).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/934

Describe the feature you'd like to see added
Currently, setting WHOOGLE_CONFIG_STYLE overwrites the official style. However, in some cases, you may simply want to add something, rather than completely overwrite it. So, maybe have something like if WHOOGLE_CONFIG_STYLE doesn't start with :root, just append to the official style, else, overwrite it?

Additional context
This request comes from the fact that I want to change the width of the page (which should probably be its own setting) and the color of the logo without changing anything else on the page. The idea is that this: WHOOGLE_CONFIG_STYLE="body {max-width: 100% !important; /* or whatever width you want */} #whoogle-w { fill: #685e79; } #whoogle-h { fill: #685e79; } #whoogle-o-1 { fill: #685e79; } #whoogle-o-2 { fill: #685e79; } #whoogle-g { fill: #685e79; } #whoogle-l { fill: #685e79; } #whoogle-e { fill: #685e79; } " should work as expected.

A POC:

 self.style = open(os.path.join(app_config['STATIC_FOLDER'], 'css/variables.css')).read()
        if os.getenv('WHOOGLE_CONFIG_STYLE',"").startswith(":root"):
            self.style=os.environ["WHOOGLE_CONFIG_STYLE"]
        else:
            self.style+=(" "+os.getenv('WHOOGLE_CONFIG_STYLE',""))
Originally created by @DUOLabs333 on GitHub (Jan 22, 2023). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/934 <!-- DO NOT REQUEST UI/THEME/GUI/APPEARANCE IMPROVEMENTS HERE THESE SHOULD GO IN ISSUE #60 REQUESTING A NEW FEATURE SHOULD BE STRICTLY RELATED TO NEW FUNCTIONALITY --> **Describe the feature you'd like to see added** Currently, setting `WHOOGLE_CONFIG_STYLE` overwrites the official style. However, in some cases, you may simply want to add something, rather than completely overwrite it. So, maybe have something like if `WHOOGLE_CONFIG_STYLE` doesn't start with `:root`, just append to the official style, else, overwrite it? **Additional context** This request comes from the fact that I want to change the width of the page (which should probably be its own setting) and the color of the logo without changing anything else on the page. The idea is that this: `WHOOGLE_CONFIG_STYLE="body {max-width: 100% !important; /* or whatever width you want */} #whoogle-w { fill: #685e79; } #whoogle-h { fill: #685e79; } #whoogle-o-1 { fill: #685e79; } #whoogle-o-2 { fill: #685e79; } #whoogle-g { fill: #685e79; } #whoogle-l { fill: #685e79; } #whoogle-e { fill: #685e79; } "` should work as expected. A POC: ``` self.style = open(os.path.join(app_config['STATIC_FOLDER'], 'css/variables.css')).read() if os.getenv('WHOOGLE_CONFIG_STYLE',"").startswith(":root"): self.style=os.environ["WHOOGLE_CONFIG_STYLE"] else: self.style+=(" "+os.getenv('WHOOGLE_CONFIG_STYLE',"")) ```
kerem 2026-02-25 20:36:04 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#580
No description provided.