• Resolved may1937

    (@may1937)


    Hello, Diana.

    @import has been unavailable since last month.
    Was there any change in specifications?

    It seems that @import will be abolished from October 2022. Is there anything to do with it?

    I would appreciate it if you could tell me.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    What do you mean by @import “has been unavailable”? Could you tell me exactly what you’re trying to do and what doesn’t work? Are you talking about the plugin’s feature to import custom codes or are you trying to use the CSS @import directive in a custom code and it doesn’t work?

    And in which way doesn’t it work? Do you get an error?

    Where is it written that the @import will be abolished from October 2022?

    At the moment I’d appreciate a bit of context for your questions.

    • This reply was modified 2 years, 8 months ago by Diana Burduja.
    Thread Starter may1937

    (@may1937)

    See this for the deprecation of @import.
    Is this an issue unrelated to this plugin?

    https://sass-lang.com/blog/the-module-system-is-launched

    The fact that @import cannot be used means that the file specified by @import cannot be read.
    After that, the CSS written in the SASS syntax is output as plain text, and it is not compiled into a proper CSS.
    What I’m trying to read with @import is a file that summarizes @mixins and constants, but it seems that the cause is that it becomes undefined because it can not be read.
    No errors or warnings will be displayed when updating.
    If you remove @import, it will work properly.

    @import is being replaced by @use and @forward. But, even as a Pro user, I can’t get either of these, nor @import, to work.

    Please advise.

    Thank you.

    Plugin Author Diana Burduja

    (@diana_burduja)

    The @import directive can be used inside a custom CSS/SASS code by defining an “ID” for the SASS custom code that needs to be imported (ex: vars.scss) and then using that ID as follows:

    @import ‘vars.scss’;

    in the SASS custom code that needs to import the other custom code.

    If that doesn’t work, would you please make a few screenshots with the two custom SASS codes (the one that needs to be imported and the one where it needs to be imported) along with their options, so that I could try to replicate your usecase exactly on my test website and see what is wrong?

    An update from my side here: I got @import to work, although still having some issues with @extend.

    Regarding the overall thread, it seems this plugin is using LibSass and not Dart Sass and only the latter supports @use and @forward. I imagine it will be some effort to migrate from libsass (with perhaps the direct reliance from the plugin on sassphp?) to Dart, though it is strongly encouraged.

    I will report my issue with @import and @extend in a separate thread.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘@import doesn’t work’ is closed to new replies.