SwayNotificationCenter icon indicating copy to clipboard operation
SwayNotificationCenter copied to clipboard

Consolidate --noti-bg and --noti-bg-alpha in a single variable

Open chkrb opened this issue 5 months ago • 0 comments

I prefer having a minimal CSS, and having it synced to GTK's colorscheme, so I use GTK's CSS variables: @window_bg_color, @window_fg_color, etc. These colors are in rgb() or a similar format, which makes it not possible to set --noti-bg to.

It's also a matter of inconsistency; all colors are in rgb() format, except --noti-bg. It is simply a set of three comma-separated values.

Digging through the scss file and doing my due research, I created a new variable, --noti-bg-normal, which used the color equivalent to rgba(var(--noti-bg), var(--noti-bg-alpha)). Used it wherever applicable.

There was also this one instance where the alpha value was constant. I decided to use GTK's alpha(), but found out that it is already used by SASS. Thusly, I had to create a function which generated the required alpha() code upon compilation.

I guess its safe to say that --noti-bg and --noti-bg-alpha can be marked as deprecated.

chkrb avatar Nov 18 '25 17:11 chkrb