eww
eww copied to clipboard
[FEATURE] Access to GTK CSS inside stylesheet
Description of the requested feature
I have noticed that GTK specific CSS works, but only in the yuck file with the style macro.
This works inside eww.yuck
(box :class "box" :style "background-color: @window_fg_color" (children))
But this does not inside eww.scss
.box { background-color: @window_fg_color; }
I have tried importing the gtk.css, however some of the @ functions that GTK uses, are not in standard SCSS. ie @define-color, so this does not work either.
This is fine for most things, until you want to use a selector, or access themed icons.
I had a quick look and it looks like SCSS parsing is done by grass, so this probably isn't a trivial solution. However, having a GTK application have access to GTK CSS kinda makes sense.
Proposed configuration syntax
No response
Additional context
https://docs.gtk.org/gtk3/css-overview.html
I had a look at how it's done in some gtk themes
.box { background-color: gtkcolor(window_bg_color); }
This compiles with sassc, grass-cli, but fails in eww.
error: 'gtkcolor' is not a valid color name ┌─ /home/lucas/Projects/nix/homemanager/lucas/dotfiles/eww/eww.scss:34:1 │ 34 │ background-color: gtkcolor(window_bg_color); │ ──────────────────────────────────────────────
Yup same issue here id love to have this work as this would make me be able to have it change colors very nicely if my GTK theme changes