Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

linear-gradient not recognizing color variables

Open EKK0-DM opened this issue 1 year ago • 3 comments

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?

EKK0-DM avatar Aug 20 '24 21:08 EKK0-DM

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

Ace-c avatar Aug 23 '24 19:08 Ace-c

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.

EKK0-DM avatar Aug 23 '24 21:08 EKK0-DM

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

Ace-c avatar Aug 25 '24 17:08 Ace-c