Skip to content
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

Add a deprecation warning for @import's that resolved .css files #2613

Merged
merged 1 commit into from
Mar 24, 2018

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Mar 24, 2018

See #2611

This is the first to removing native CSS imports.

Like Ruby Sass, Dart Sass will not implement this behaviour. This is
blocking compatibility between Node Sass and Dart Sass.

This is a non-standard behaviour which is constant source of confusion.

We had originally planned to removed this behaviour when the module
system was ready. However that has feature has been delayed and
people are continuing to be tripped up by this behaviour.

DEPRECATION WARNING on line 1, column 8 of /libsass/test.scss:
Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.
Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.

@xzyfer
Copy link
Contributor Author

xzyfer commented Mar 24, 2018

@nex3 feel free to word smith the deprecation warning.

Linking to a specific custom importer implementation/documentation is tricky because LibSass is mostly used embedded into other projects.

@xzyfer xzyfer force-pushed the deprecate-css-import branch 2 times, most recently from 3018ac9 to e7f2fa7 Compare March 24, 2018 02:25
This is the first to removing native CSS imports.

Like Ruby Sass, Dart Sass will not implement this behaviour. This is
blocking compatibility between Node Sass and Dart Sass.

This is a non-standard behaviour which is constant source of confusion.

We had originally planned to removed this behaviour when the module
system was ready. However that has feature has been delayed and
people are continuing to be tripped up by this behaviour.
@xzyfer
Copy link
Contributor Author

xzyfer commented Mar 24, 2018

Back ported to 3.5-stable

@xzyfer
Copy link
Contributor Author

xzyfer commented Mar 27, 2018

Rebased this off of master since it only belongs in 3.5.
The deprecated raw css imports are being removed in 3.6. See #2615.

@remotezygote
Copy link

There needs to be something somewhere that tells you what to do about this warning. It cropped up all of a sudden, and I have no idea how to make it go away. Where is the documentation about what to do when you hit this? There appears to be zero documentation about sass_option_push_import_extension anywhere... did I miss something? Is that a function you call? Is that a configuration item? What is it?

@xzyfer
Copy link
Contributor Author

xzyfer commented May 2, 2018

There needs to be something somewhere that tells you what to do about this warning

The resolution is to stop importing .css files. This is a non-standard feature that goes against the Sass language spec.

There appears to be zero documentation about sass_option_push_import_extension anywhere

It's a temporary work around in the C API for integrators. It's use is highly discouraged! It is only offered a temporary polyfill to enable each implementation to migrate their users off of the invalid behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants