Css in V4

Hi guys



How can i change body font to 12px without changing it in admin backend in themes? I tryied change font size in scheme.less, i added body { font-size:12px} into styless.css but no change (rebuild chache is on).

Why don't you want to change it in the theme designer? That's what it's there for.



There are a whole series of styles that pickup that font size so it's not as easy as changing the body as the later styles override it.



If you use the CSS inspector (firebug etc) in your browser you'll see which styles are affected.

Thanks for answer. Since cs 2.x i was changing design through .css so i could design site to my needs and font 13px is no good (as far as i know 12px is standard and font looks much better on site). If there is no way how to change basic body font to 12px i will have to change it in css to 12px everywhere where is set to 13px as a standard which gives me more lines in css. :(


[quote name=‘NairdaCart’ timestamp=‘1373878592’ post=‘165344’]

Why don’t you want to change it in the theme designer? That’s what it’s there for.



There are a whole series of styles that pickup that font size so it’s not as easy as changing the body as the later styles override it.



If you use the CSS inspector (firebug etc) in your browser you’ll see which styles are affected.

[/quote]

I did raise a bug report during the beta stage that 13px fonts couldn't be selected and they did mark it as being added to the release version but it's still not there and the bug report seems to have been deleted.



You could try using the !important tag to override the other styles.

!important tag works fine for links(same color for all) but not for body (12px). I try not to change scheme.less at all, so far i can do changes through styles and base.css accept the body font. Thanks


[quote name='NairdaCart' timestamp='1373882794' post='165346']

I did raise a bug report during the beta stage that 13px fonts couldn't be selected and they did mark it as being added to the release version but it's still not there and the bug report seems to have been deleted.



You could try using the !important tag to override the other styles.

[/quote]

I was wrong about the theme editor. I was looking at my old beta install. The release version does let you specify 13px as a font size.

I had the same issue, and it drove me nuts. But in the end, the solution was logical. Depending on what theme you're using, there's further customizations that overwrite scheme.less CSS settings. Check the /presets/data/ folder (for example /design/themes/classyshop/presets/data/satori.less) and find the theme preset .less file.



To find out which .less file you have to edit:

  1. Change CSS in satori.less, upload file
  2. delete /var/cache/
  3. Reload website to trigger recompiled .css
  4. check css file to see if your change shows up