Comments (7)
@csaeum Hard to say without loading up a test case, but I think the first step in troubleshooting would be to not use {{siteUrl}}
in your import paths, and instead import relative to your base Craft install path as specified here https://github.com/chasegiunta/scss#import
from scss.
Ok I moved the SCSS of UIKIT into the Templates folder and imported them by relative path:
{% scss %} {# 1. Variablen #} $global-link-color: #DA7D02; {# 2. Standards laden #} @import "../_includes/assets/scss/variables-theme.scss"; @import "../_includes/assets/scss/mixins-theme.scss"; {# 3. Nacharbeiten #} @mixin hook-card() { color: #235689; } @mixin hook-card() { background-color: $global-link-color; } {# 4. rest nachladen #} @import "../_includes/assets/scss/uikit-theme.scss"; {% endscss %}
Do I understand something wrong. Can you post an example or how can I tell that he is parsing it or not?
But I just see that he also does not spend the variables I specify in the SCSS but only outputs the IMPORTS
from scss.
If you're putting your scss imports in your templates folder, your @imports
would look like this:
@import "templates/seelenleben-2019/_includes/assets/scss/variables-theme.scss"
Stemming from the base of your Craft install.
Is this example code working as expected?
{% scss %}
/*! Comment */
.navigation {
ul {
line-height: 20px;
color: blue;
a {
color: red;
}
}
}
{% endscss %}
from scss.
The First generated this Output:
<style>@import "templates/seelenleben-2019/_includes/asssets/scss/variables-theme.scss";
The Second generated this Output:
<style>/*! Comment */
.navigation ul {
line-height: 20px;
color: blue;
}
.navigation ul a {
color: red;
}
</style>
Thanks for yout Help
I tested this with PHP 7.0.33 and PHP 7.2.13
from scss.
@csaeum there was a typo in assets
that I corrected in my comment. Correct it on your end
from scss.
Ok thanks
it works now, thanks for your help. Will the generated files be cached for some time in a future release?
So that it does not have to be generated for every page view?
from scss.
You can wrap your {% scss %}
tags in in Craft's native {% cache %}
tags and set the cache duration to whatever you'd like.
I don't have plans currently to implement file caching.
from scss.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scss.