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

@import statement in sfwbar.css now assumes relative path is relative to $HOME #231

Open
jjramsey opened this issue Sep 7, 2024 · 1 comment

Comments

@jjramsey
Copy link

jjramsey commented Sep 7, 2024

My sfwbar.css file used to have two @import statements that had worked just fine:

@import 'purple-colors.css';
@import 'workrave.css';

Both purple-colors.css and workrave.css were in the same directory as sfwbar.css, and it all just worked.

With the sfwbar compiled from the latest git code, this stopped working, and when I ran sfwbar from the terminal, I saw error messages indicating that sfwbar was trying to load the files $HOME/purple-colors.css and $HOME/workrave.css, and failing.

Currently, I've worked around this by using absolute paths for the @import statement, but this is a bit inconvenient.

@LBCrion
Copy link
Owner

LBCrion commented Sep 7, 2024

This one may be impossible to fix. The latest version of sfwbar pre-processes CSS in order to correctly handle the legacy item names. This means we need to load the css via gtk_css_provider_load_from_data rather than gtk_css_provider_load_from_path. In case of the later, GTK uses the path of the file to get the directory, but in case of the former it doesn't have it (and doesn't have a way to supply it). Unfortunately this means there is no way to both pre-process the CSS and to retain it's path for the parser.

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

2 participants