Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.28k stars 689 forks source link

linear-gradient not recognizing color variables #3536

Open EKK0-DM opened 3 weeks ago

EKK0-DM commented 3 weeks ago

I am trying to integrate pywal with waybar and am running into issues with using color variables inside of linear-gradient. I've imported my colors from pywal successfully

@import 'path/to/colors-waybar.css'

@define-color color1 @color1;
@define-color color2 @color2;
@define-color textcolor @cursor;

These variables work when styling most parts of waybar, ie

#workspaces button.active{
  color: @textcolor;
}

works just fine.

When trying to do the same thing with linear-gradient, ie

#workspaces button.active{
  color: @textcolor;
  background: linear-gradient(45deg, @color1, @color2};
}

it just defaults to black. I've tested this with the hexcodes for those color variables and it renders the gradient just fine. Is this a bug or something I'm formatting wrong?

Ace-c commented 3 weeks ago

This is not a bug, I think. It's just that, this features is not supported by waybar

EKK0-DM commented 3 weeks ago

Which feature? I am able to get the gradient to work by using the color hexcodes. image And the color variables work everywhere else in the style sheet, just not within gradient functions.

Ace-c commented 2 weeks ago

Which feature? I am able to get the gradient to work by using the color hexcodes. image And the color variables work everywhere else in the style sheet, just not within gradient functions.

You can get gradient worked directly but he's not taking abt that, he's taking abt defining color ( custom directive ) not support linear gradient function