Alice :neocat_flag_transbian: on Nostr: So, CSS variable support has landed in GTK, and libadwaita now uses it. Note that ...
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
https://mk.nyaa.place/files/3f9056d3-6728-4e51-9cb4-b241fa771782
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
https://mk.nyaa.place/files/3f9056d3-6728-4e51-9cb4-b241fa771782