Comments (10)
@MartijnCuppens , this appears to be a problem with my webpack configuration and not RFS. Thanks for introducing the warning, it definitely helped me trace the source.
I'll try to resolve it from here.
from rfs.
Hi @themounthead,
Do you override the unit()
function somewhere in your setup?
from rfs.
Thanks for your response.
I've left the RFS defaults as is, haven't done any overrides or variable changes. Oddly the same setup works fine with v7.1.4.
Is there any new configuration or preset needed ? Thanks.
from rfs.
There is no different configuration needed to upgrade from 7.1.4 to 7.1.8. Can you test the versions between 7.1.4 and 7.1.8 so we can detect where it went wrong?
from rfs.
@themounthead, could it be you 're including the mixin twice? I encountered the same error today when I did this.
from rfs.
@MartijnCuppens , that's a good point. I double-checked my setup and I've imported rfs only once with @import '~rfs/scss/_rfs';
I also deleted my node_modules/
and re-installed the app setup. With v7.1.8, I get the same error. But when I explicitly install v7.1.4, its working as expected.
I'll have to create a skeleton Angular App and try to trace the problem. The only other Sass mixin I'm using in addition to this is include-media; not sure if that's creating some kind of interference.
from rfs.
Can you try v7.1.9
and let me know if everything is ok with that version?
from rfs.
@MartijnCuppens , I tried out the new version and as you mentioned I see a Warning stating that the 'RFS is included more than once'. This kind of puts me in a fix.
I've organized my App into components with each component having its own .scss properties. At the global level, I've defined a variables file where I've specified all Sass variables and imported RFS here.
If I move the RFS import at the Application root, I get an error no mixin named rfs
which implies that the mixin is needed at every @include
.
Am I missing something, please advise.
from rfs.
@themounthead,
That's a safety I build into v7.1.9
. One way or another you 're importing RFS twice which you shouldn't be doing.
You should be able to see where you included the mixin the second time, something like this:
WARNING: Watch out, RFS is included more than once!
on line 209 of ../../../scss/_rfs.scss
from line 2 of src/main.scss
If that looks ok to you, it's probably the first import which is causing the issue. Worst case you can add a @warn
to node_modules/rfs/scss/rfs.scss
folder so you can trace where your first import happens.
from rfs.
@MartijnCuppens , please bear with me a bit longer. I'm kind of going in circles here.
I've been able to import other mixins like _typi
, _include-media
globally without any error/warning.
My doubt is when I import RFS once (at the root scope), I get an error no mixin named rfs
from every module component that uses the @include rfs
mixin.
This error led me to include it within my .scss variables file. But on doing that, I end up with a long stream of warnings that I shouldn't include it more than once (which I agree is not a good practice).
Does this mean I have to define the RFS variables in only one file and refer them in other .scss component files.
Thanks
from rfs.
Related Issues (20)
- Error while running less - Potentially unhandled rejection [2] Could not parse call arguments or missing ')' on line 120 HOT 5
- Error with custom values HOT 1
- rfs() doens't work inside calc()
- PostCSS 8 compatibility HOT 2
- Strange values generated in Bootstrap 4.6 HOT 1
- Unclear doc concerning rfs-base-value or bug
- Use Sass Modules (dart-sass) HOT 18
- RFS + Less + css variables warning HOT 3
- Is RFS installed and enabled as part of Bootstrap 5? HOT 5
- Variation in size range seems too small HOT 1
- Migrate to postcss 8.x HOT 1
- rfs not working with $variable list ? HOT 1
- Minimum font size. HOT 2
- Feature Request - add overloads for shorthand mixins HOT 2
- rem and px have incompatible units in rfs-breakpoint HOT 2
- $rfs-base-value with rem breaks
- How to it this with tailwind ? HOT 4
- Sass ABS deprecation warning HOT 2
- using rfs() in SCSS with PostCSS syntax doesnt work HOT 1
- How to use it with react ? HOT 1
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 rfs.