numixproject / numix-gtk-theme

A modern flat theme with a combination of light and dark elements.
GNU General Public License v3.0
1.2k stars 227 forks source link

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

Open Alexander-Shukaev opened 2 years ago

Alexander-Shukaev commented 2 years ago

Moved from Ferdi265/numix-solarized-gtk-theme#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 commented 2 years ago

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

patatetom commented 2 years ago

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 commented 2 years ago

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; : https://github.com/numixproject/numix-gtk-theme/blob/0d6b4c8ded857ed8b118d71cd4ecafd04a2e5ed0/src/gtk-3.20/scss/apps/_thunar.scss#L14

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

Alexander-Shukaev commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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

patatetom commented 2 years ago

@Alexander-Shukaev 👍

khurshid-alam commented 2 years ago

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 commented 2 years ago

@Foggalong, why closed?

Foggalong commented 2 years ago

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