nwg-piotr / nwg-wrapper

Wrapper to display a script output or a text file content on the desktop in sway or other wlroots-based compositors
MIT License
139 stars 8 forks source link

CSS relative to screen size #9

Open xeruf opened 2 years ago

xeruf commented 2 years ago

Is there a unit I can use in the CSS that is relative to my current screen size/resolution?

xeruf commented 2 years ago

The v* units as listed on https://www.w3schools.com/CSSref/css_units.asp do not seem to work.

nwg-piotr commented 2 years ago

Look here. There's something on units relative to viewport. I'm not sure if it's going to help.

xeruf commented 2 years ago

tried that, see my second comment :/

nwg-piotr commented 2 years ago

GTK does not support all the CSS specification.

xeruf commented 2 years ago

See here: https://docs.gtk.org/gtk4/css-properties.html#basic-types So unless some magic can be done with calc (maybe nwg can predefine CSS variables containing the screen size?), I'm out of luck :/