So, CSS variable support has landed in GTK, and libadwaita now uses it. Note that it's super basic for now, it's just replacements for the old @colors. There will be more drastic changes in 2.0, but for now I need to keep backwards compatibility.

So, apps can now override them per widget, like on the screenshot (well, once the sdk updates, anyway)

And because why not, there are a few changes that variables enabled:

.error, .warning and .success style classes now also change the accent color respectively. For example, this means that a selectable label with .error style class will have a red selection as well, instead of blue.

The
.opaque style class for buttons has been deprecated - instead, apps can simply use .suggested-action and override the accent color on it (or add .error/.warning/.success - that works too). This will also change the focus ring, and similarly, .destructive-action buttons have red focus rings now.

Apps are encouraged to migrate, but the old colors will keep working until 2.0. For example,
@accent_color can be replaced with var(--accent-color) and so on, note the dashes in the names instead of underscores. See the docs for more info: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/css-variables.html

Follow

@alice That was a doozy of a merge review. Thank you for sticking through it! 😀. It turned out great.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml