Hi,
I recently used the new os 2.0 free theme Craft and would like to add and edit some css on the theme itself by accessing the base.css and somehow when I add or create a separate css and import it, the new css did not seem to work, try the very basic add a red border on a new css, import it on the base.css by using @import and saved, preview it but the theme did not change anything, is there anything that I miss on edit the css or html on the theme itself?
Most of the themes use a minified css file, a very compact version of the main css file. I have never had a look at the code for the theme Craft, but it might be the case here as well. I think you have two possibilities now:
-
check the files in your theme to make sure you are accessing and modifying the correct one. If you have something similar to base.css.min or base.dev.css, containing a very crowded/compact css, that is probably the file the website is currently loading. if this is the case, you can check the theme.liquid file and search for the line of code where your css is included (similar to {{ ‘base.css’ | asset_url | stylesheet_tag }}) and change its name to the one that is not minified and that you wish to modify
-
a simpler solution would be to add your own css file and override the existing styling. I think is it a better solution, not to interfere with the base code and to keep your changes together in one place. To do this, you can create another file in the assets folder (updates.css for instance) and then, in theme.liquid, bellow the line you are importing the base css file, include yours as well: {{ ‘updates.css’ | asset_url | stylesheet_tag }}
Thanks for the solution, the section options works best for me, was thinking only need to edit on the base.css only but instead need to make sure import on the theme.liquid as well. Big thanks