GithubHelp home page GithubHelp logo

Comments (7)

chasegiunta avatar chasegiunta commented on June 23, 2024

@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.

csaeum avatar csaeum commented on June 23, 2024

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

Here my Folders
2019-05-28 22_53_01-Remote — Atom

from scss.

chasegiunta avatar chasegiunta commented on June 23, 2024

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.

csaeum avatar csaeum commented on June 23, 2024

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.

chasegiunta avatar chasegiunta commented on June 23, 2024

@csaeum there was a typo in assets that I corrected in my comment. Correct it on your end

from scss.

csaeum avatar csaeum commented on June 23, 2024

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.

chasegiunta avatar chasegiunta commented on June 23, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.