Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS styling shoudn't inherit from other style.css files or sources #2549

Open
jstamant opened this issue Oct 3, 2023 · 1 comment
Open

Comments

@jstamant
Copy link

jstamant commented Oct 3, 2023

(EDIT: striked-out some non-factual information.)

Waybar's styling shouldn't inherit CSS from multiple sources. If a user has a configuration in $XDG_CONFIG_HOME/waybar/style.css, it shouldn't be taking CSS from the default /etc/xdg/waybar/style.css file or from any default internally.

I noticed this when I wanted to craft my own waybar style. No matter what I did in my style.css, there always seemed to be something interfering with it. And there is - the default "minimal example configuration". Having multiple stylesheets on websites is certainly a thing, but waybar being a user-space program, it shouldn't behave the same way. Waybar should only source one CSS file, according to its hierarchy of config file locations.

I removed the config files at /etc/xdg/waybar/*, but waybar still seems to be inheriting the transition-property CSS property from somewhere, so it must be applying it automatically. So waybar might not be sourcing more than one file, so it's probably applying some hard-coded CSS from inside the source files.

@jstamant
Copy link
Author

jstamant commented Oct 5, 2023

After reviewing the code and playing around with CSS files in different locations, it's clear that waybar only reads one single CSS file 👍. What was throwing me off was that waybar appears to inherit some styling from the system's GTK theme? (also seen in #60, and in the FAQ - The Workspace-Buttons have a strange hover effect)

When providing a blank CSS file, waybar seems to share the color and appearance of a GTK app, including transition-property: background-color; and transition-duration: 0.5s; CSS properties that made it seem like they were inherited from the "minimal example configuration".

A possible bug: I found it interesting that waybar presented a perfectly useable bar style whe you provide an empty CSS file, but when no CSS file is found, it throws an error!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant