Styling with 5.7
Permalink
Hello,
I followed MrKDilkington's how to "How to copy the Elemental theme to use as a base for new themes", and I've done that, but I'm not seeing how to change the styles. I've read that the main.less is my main stylesheet, but when I add styles to it nothing happens. I've cleared the cache and still nothing.
Thanks in advance!
I followed MrKDilkington's how to "How to copy the Elemental theme to use as a base for new themes", and I've done that, but I'm not seeing how to change the styles. I've read that the main.less is my main stylesheet, but when I add styles to it nothing happens. I've cleared the cache and still nothing.
Thanks in advance!
Oh and while making changed to the less files make sure you turn off all caching options!
Just empty cache is not enough.
Just empty cache is not enough.
@Kurtopsy
The first thing I recommend doing is getting up to speed with Less -http://lesscss.org/features/ . There are many free tutorials available online to learn about it.
Learning how to use Less is not a requirement for creating a theme, but is required if you want to use theme presets and customizable styles. If you don't intend on using these features, then a regular .css file will work.
A strong possibility for why styles you added to main.less don't appear to take effect, is CSS specificity. Your CSS styles may be less specific than existing styles already set in the Elemental theme. One way to test is by adding "!important" to your CSS value and then seeing if the style is applied (using "!important" should be reserved for testing and edge cases).
https://css-tricks.com/specifics-on-css-specificity/...
http://www.smashingmagazine.com/2007/07/27/css-specificity-things-y...
http://www.htmldog.com/guides/css/intermediate/specificity/...
The first thing I recommend doing is getting up to speed with Less -http://lesscss.org/features/ . There are many free tutorials available online to learn about it.
Learning how to use Less is not a requirement for creating a theme, but is required if you want to use theme presets and customizable styles. If you don't intend on using these features, then a regular .css file will work.
A strong possibility for why styles you added to main.less don't appear to take effect, is CSS specificity. Your CSS styles may be less specific than existing styles already set in the Elemental theme. One way to test is by adding "!important" to your CSS value and then seeing if the style is applied (using "!important" should be reserved for testing and edge cases).
https://css-tricks.com/specifics-on-css-specificity/...
http://www.smashingmagazine.com/2007/07/27/css-specificity-things-y...
http://www.htmldog.com/guides/css/intermediate/specificity/...
Hi MrKDilkington,
Thank you for the suggestions and links to more information! I'll give that a try.
Thank you for the suggestions and links to more information! I'll give that a try.
And make sure your new theme is actually activated