[Feat] Add class support
Having class support would be very helpful as I am currently using span tag to achieve my waybar setup which is working great only thing missing is the ability to configure some paddings within the elements of those span tags.
It is a great bar, I just need to define specific padding in those elements. Specifically I would like to increase the height or top+bottom padding of the right side modules, [why?] because if I increase the height of my bar the height of the right padding modules remain the same i.e they don't keep in ratio with it.
Here is how it will look after increasing height: As you can see the left modules are prefect but the right modules need some top+bottom padding which I can't provide rn.
I would love to know if there is any other way of achieving it rn, which I don't believe there is, but, I request devs to look into this feature request.
My bar
As mentioned in the wiki , waybar uses GTK 3.0 CSS capabilities. So I assume that if GTK does not support classes, there's not a lot that Waybar can do.
@apiraino, I'm surprised to hear that. I had been anticipating the implementation of that feature. I require it for my purposes. Are there any potential alternatives or workarounds that could be explored?
GTK does support CSS classes, many waybar modules set classes. E.g. for the custom module, a custom class can be set from the exec script.
The problem here is that Pango doesn't support anything that can be used in the CSS. For one thing, "class" is not part of any of Pango elements' attributes (see Pango doc), but also, the markup doesn't show up in the CSS hierarchy (check with GTK_DEBUG=interactive), it just remains a label.
In this particular case, I think Pango's line_height attribute for span might help, although it's very likely not as exact as a padding with px.
@RobertMueller2, Thank you for your answer. Okay this does solve the problem to the extent that I can forget about adding classes but would be more than happy if it gets implemented as I would like to completely remove pango and use proper css classes and seperate out config and css files.