-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to extend theme CSS? #2124
Comments
The use of @import depends on your use case and isn't always the best option. You should be able to do what you want in the CSS file. You're free to set it up as you wish. If the one you use is actually to be used "as-is" (from a 3rd-party or a known library), could you use a different CSS file and use ? Ref: https://stackoverflow.com/questions/10036977/best-way-to-include-css-why-use-import |
To add additional CSS file to page I would need to modify theme page template. For easiest maintainability of my app, its best not to modify theme unless some functionality is missing. I do not need to modify theme, just override few CSS definitions and I think that @import from theme + add mine styles is cleanest way to do it. Theme will not be modified - I will just git pull theme updates without conflicts. |
You could:
It doesn't seem to be an issue with Zola. You're free to do what you want with your CSS files. |
This works: https://zola.discourse.group/t/override-scss-from-theme/1066 It should be documented. Its seems to be frequently asked question for static site generators. |
|
Seems like this would work if the build steps were reordered so that sass rendering happens after static files (at least theme static files) are copied to the output directory. Would that break anything else? In my mental model, all theme processing should probably happen before any site processing, so that anything in the site can override anything in the theme. |
Theme css can be overridden by creating CSS with same name. In most cases its better to extend CSS, not to replace it.
Natural way of extending CSS is to use @import theme.css from site SCSS file. I haven't find any way how to do it. Is this already implemented in some way? Can it be implemented and documented?
@import path like '/themes/name/file'
The text was updated successfully, but these errors were encountered: