Comments (3)
You can use the meta.load-css
mixin for this, which allows you to load the CSS but not the Sass members from a file
from dart-sass.
I have found a temporary workaround, but it requires @import
which will be removed soon. So we would still need a permanent solution eventually.
You will need to create a separate file:
_block.scss
@use '../../node_modules/@some-library/scss-part-1';
@use '../../node_modules/@some-library/scss-part-2';
Then in main.scss
body#front-end,
.page-builder-preview-container {
@import 'block';
}
-
Note this is different then importing the css library partials in main.scss as that could break the css libraries rendering hierarchy.
-
One caveat I found is that it doesn't render nested mixins correctly. This might be a bug in sass or an unconventional use not covered by sass.
from dart-sass.
This worked perfectly, Thanks
from dart-sass.
Related Issues (20)
- [Feature Request] Ability to use @extend with :is HOT 1
- Unable to build on Alpine: so:libicuuc.so.74 (no such package) HOT 2
- Imports not resolving correctly when in nested path HOT 3
- i have a issues with dart-sass HOT 3
- Doesn't run on alpine linux HOT 6
- Using `math.random()` in css module leads to a wrongly generated class names HOT 1
- Bad state error when using `meta.apply` and compile with `render` HOT 2
- Unable to use meta.get-mixin to pass mixin as a value to another mixin, then use it in its content. HOT 3
- FileSpan is not defined when using @warn with a custom logger. HOT 1
- Q&A: How can i fix waring import sass from 'sass'` is deprecated HOT 4
- Q&A: How to prevent color names being transformed to hex values HOT 2
- Dependency URLs with a `file` schema fail to resolve
- Standalone sass compiler: Can't find stylesheet to import HOT 1
- [feature request] Official Python bindings to replace `libsass-python` HOT 3
- box-shadow property not respecting strict unary operator with 0
- linux-musl 1.71.0 release builds are broken
- ESM export of `NodePackageImporter` is missing.
- Node package importer requires an entryPointDirectory in ESM HOT 1
- Deprecation message replaces underscores with hyphens HOT 2
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 dart-sass.