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

Theme parsing error: gtk-dark.css:9381:21: Not using units is deprecated. Assuming 'px'. #757

Open
Alexander-Shukaev opened this issue Dec 5, 2021 · 12 comments

Comments

@Alexander-Shukaev
Copy link

Alexander-Shukaev commented Dec 5, 2021

Moved from Ferdi265#29.


Hi there, I see a lot of warnings after system upgrade:

Theme parsing error: gtk-dark.css:9381:21: Not using units is deprecated. Assuming 'px'.

I think some styles need to be updated to include px where it's meant. Thank you!

@Alexander-Shukaev
Copy link
Author

Hi, just wanted to follow up if there was any chance to look into this?

@patatetom
Copy link

hi,
I have the same problem and I'm unable to find the source of the problem.
I'm using this (light not dark) theme with OpenBox and I can't find this line (9228 for me) that is causing the problem : does anyone have a clue ?
regards, lacsaP.

@patatetom
Copy link

after some research, it seems that the problem comes from gtk-3.20/gtk.gresource which contains the compiled gtk.css file.

using gresource allows you to extract the gtk.css file, correct it and then replace the existing one (which only calls the compiled version) :

cd /usr/share/themes/Numix/gtk-3.20/
gresource extract gtk.gresource /org/numixproject/gtk-3.20/dist/gtk.css > gtk.css
sed -i 's/border-top-width: 1;$/border-top-width: 1px;/' gtk.css 

in fact, the error seems to be linked to this single line which is the only one to contain the string border-top-width: 1; :

I hope this help for the dark theme, regards, lacsaP.

@Alexander-Shukaev
Copy link
Author

Extracting those does not even result in files having enough lines (e.g. 9381). Also tried to search for the property you linked and does not seem to be there.

@patatetom
Copy link

after extracting and replacing gtk-dark.css , try this search to highlight lines that are missing px units :

cd /usr/share/themes/Numix/gtk-3.20/
egrep -n '[1-9]; gtk-dark.css | grep -v '#'

not all lines are concerned (opacity for example).

regards, lacsaP.

@patatetom
Copy link

the string border-top-width: 1; is present at line 9349 of the decompiled file gtk-dark.css.

the use of the previous sed command should solve the problem of this entry without unit whatever the line concerned :

sed -i 's/border-top-width: 1;$/border-top-width: 1px;/' gtk-dark.css

regards, lacsaP.

@Alexander-Shukaev
Copy link
Author

@patatetom, man, thanks a lot. I realized that on my first attempt I tampered with an outdated /usr/share/themes/Numix instead of /usr/share/themes/NumixSolarizedDarkBlue that I'm actually using. Fixed now exactly the way you suggested. Now only looking forward for this to be applied upstream. All the best!

@Alexander-Shukaev
Copy link
Author

@darkshram, it comes from #751, where @Ferdi265 already pointed this out. Merged by @khurshid-alam.

@patatetom
Copy link

@Alexander-Shukaev 👍

@khurshid-alam
Copy link
Contributor

It would be great if someone make a merge request. This is Saas compiler issue where it is treating this as error instead of warning. Fixed in debian I think.

@Alexander-Shukaev
Copy link
Author

@Foggalong, why closed?

@Foggalong Foggalong reopened this Feb 12, 2022
@Foggalong
Copy link

@Alexander-Shukaev My bad, I misread your last message as saying #751 had closed it!

darkshram added a commit to darkshram/numix-gtk-theme that referenced this issue Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants