this post was submitted on 01 May 2024
16 points (90.0% liked)
Linux
48329 readers
639 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
That's it. Thank you for this.
You're most certainly welcome.
I wanted to add on this, for anyone else stumbling across this post and struggling with sidebar theming: The above will work 90% of the time, but in case your
some-random-theme.css
overrides@sidebar_
, or doesn't follow the naming convention to begin with, search your gtk.css for.sidebar-pane
, which should be the actual css selector for@sidebar_
, and.content-pane
for@secondary-sidebar_
.Gotcha. One last thing. Do I need to define helper colors as well? currently I am not doing that, but it is defined in the adw styleguide. Ain't no way gruvbox has that much color varieties so what's your suggestion?
Nah, unless you're unhappy with the current outcome, you can leave it as it is.
Changes in
.config/gtk-4.0/gtk.css
will be applied on top of the stylesheet, so whatever you don't override there, will fall back to the default, that's why your sidebar previously went full Adwaita light mode.After taking a brief look at the libadwaita source, as far as I can see, helper colors are a special case anyways,
@borders
as well asborder_color
is used exclusively in thescss
files (which the gtk.css is generated from), whereas the gtk.css for some reason doesn't get back to the generic name, but uses the assigned valuealpha(currentColor,0.15)
- which doesn't help your case at all.To actually change @borders, you would need to modify its value in .scss and regenerate the .css then.
For your other point, there's no need to introduce a new color for this, since the helper color is an alpha value derived from your foreground color (that's what currentColor is referring to), so if you change
_fg_color
in gtk.css,@borders
will change along with it.Alright. Thank you so so so much.