Postings

You can freely browse the forum and post in the community forum.
However, you need a valid license to write posts for support (own a valid commercial software license or have purchased a support membership).

Posts only show once reviewed. This is mainly preventive to keep spam away. Thank you for your understanding!

CSS' selectors specificity

  • imma
  • imma's Avatar Topic Author
  • New Member
  • New Member
More
IP: 83.51.82.69 8 years 10 months ago #4954 by imma
It seems that Firefox and Chrome are not evaluating the same way CSS' selectors specificity. So this is the result for a .newsextra font-size:

Chromium Version 63.0.3239.84 (Developer Build) built on Debian 9.3, running on Debian 9.3 (64-bit)
Code:
font-size: 11.2px; 0.8em #lnee_399 .newsextra css-133ea-30927.css:54 medium #lnee_399 ul.latestnews-items li css-133ea-30927.css:54 0 .lnee ul.latestnews-items css-133ea-30927.css:24 14px body css-dd404-11003.css:6 10px html css-dd404-11003.css:6

Firefox ESR 52.5.2 (64-bit)
Code:
font-size: 12.8px; : css-133ea-30927.css:54; : #lnee_399 ul.latestnews-items li medium; : css-133ea-30927.css:54; : #lnee_399 .newsextra 0.8em; : css-133ea-30927.css:24; : .lnee ul.latestnews-items 0px; : css-ee29c-11003.css:6; : body 14px; : css-ee29c-11003.css:6; : html 10px;

Do you think you could contrive a more specific selector for the font-size taken from module settings? And maybe you could warn the developers who are going out of the way, too.
  • syw
  • syw's Avatar
  • Administrator
  • Administrator
More
IP: 24.185.113.161 8 years 10 months ago #4956 by syw
Replied by syw on topic CSS' selectors specificity
Hello!

The font-size: medium is used when using 0 as the font size reference of the text (in the layout tab).
As a quick fix to your issue, give it a value similar to the font-size your template uses or a value that suits you most.
I will re-visit this and avoid using 'medium', as it is different from browser to browser unexpectedly.

Olivier.
  • imma
  • imma's Avatar Topic Author
  • New Member
  • New Member
More
IP: 83.51.82.69 8 years 10 months ago #4958 by imma
Replied by imma on topic CSS' selectors specificity
Anyway, as you can see, in Firefox the selector
Code:
#lnee_399 ul.latestnews-items li
has precedence over
Code:
#lnee_399 .newsextra
So, in that browser, my setting (module > Layout > Font Size: 80 %) will be overridden by the first selector, no matter how the font-size value is expressed.
Anyway, this is not actually a big problem for us. Just noticed it, and I guess it's not new.
Happy new year.
  • syw
  • syw's Avatar
  • Administrator
  • Administrator
More
IP: 24.185.113.161 8 years 10 months ago #4959 by syw
Replied by syw on topic CSS' selectors specificity
I see what you mean.

This will be fixed in the next release.

Happy New Year to you as well!

Olivier.
The following user(s) said Thank You: imma