Comments (7)
Hello! ⭐
Do you mind giving an example of how you use an exposed utility once imported? :)
from sass-guidelines.
Not at all! Take a look!
@use 'config';
@forward 'config';
@forward 'functions' with (
$my-base-url: config.$base-url,
$my-breakpoints: config.$breakpoints,
$my-font-weights: config.$font-weights,
$my-gutter: config.$gutter,
$my-palette: config.$palette,
);
@forward 'mixins';
I'm trying to start the discussion for the next version. Maybe I remember of another topics to address.
from sass-guidelines.
Ops! I'm sorry. I misunderstood your question!
I use them this way:
.foo {
@include my.exposed-mixin('bar');
}
from sass-guidelines.
Ah I see. I’m just remembering how this thing works. Wondering whether or not we should suggest a default namespace. I don’t dislike my
, but it might not always be suitable. For instance, team-based authoring might not be super comfortable with a namespace using first person, and our
is just silly. 😅
Maybe utils
or something? Or perhaps we should just not enforce it in any way?
from sass-guidelines.
I chose my
because I was talking to a PERL developer at the time.
I just wanted to feel how would be to code using the namespace idea on my styles. On the bright side, we can avoid collisions between local and global members, like my.column-width
and width
. On the dark side, it's annoying to call your definitions file again and again. However, we can't avoid the last part.
from sass-guidelines.
I came to the conclusion that to use a namespace is absolutely necessary, to avoid making a mess with new CSS features, like image-set()
.
from sass-guidelines.
I think I would be more in favour of smaller, more focused modules that are namespaced with a singular noun that logically identifies what the modules provides. For example, @use 'query';
for utilities that handle media queries. Or, once developed enough @use 'breakpoint';
for utilities handling breakpoints.
from sass-guidelines.
Related Issues (20)
- Reference stylelint-config-sass-guidelines HOT 6
- Brazilian language HOT 1
- Can't find gh-pages branch HOT 1
- An in-range update of nps is breaking the build 🚨 HOT 5
- An in-range update of standard is breaking the build 🚨 HOT 1
- An in-range update of uglify-js is breaking the build 🚨 HOT 1
- Broken link in Media Queries Usage sub section HOT 1
- An in-range update of uglify-js is breaking the build 🚨 HOT 5
- An in-range update of standard is breaking the build 🚨 HOT 1
- Replace `@import` by `@use`? HOT 12
- Dead link HOT 4
- Can I PR some changes to enhance Portuguese translation? HOT 1
- Move from Travis to Github Actions HOT 1
- Guidelines are not appearing correctly in OSX dark-mode when using Edge HOT 2
- "Undefined variable" HOT 3
- Remove references to obsolete tools (Singularity, Susy…) HOT 5
- Remove Encoding part
- Grammatical error with the end of the word in Russian language. HOT 1
- Grammatical change at #numbers-1 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 sass-guidelines.