1.0.0-rc.6 • Published 3 years ago
@snug/core v1.0.0-rc.6
snug – super neat utility generator
SCSS toolkit to create utility classes with ease.
❗ snug is still under development and functionality may change
Requirements
For now you need to use dart sass to compile your styles.
Available variants
Name | Type |
---|---|
responsive | @media |
dark | @media |
light | @media |
pseudo-class | pseudo-class |
group-pseudo-class | pseudo-class |
Basic Usage
@use '@snug/core' as * with (
$breakpoints: (
's': 640px,
'm': 768px,
'l': 1024px,
)
);
// Basic responsive variants
.banana {
@include variants('responsive') {
color: gold;
}
}
// Adding additional variants
.banana {
@include variants('responsive' 'hover' 'group-hover') {
color: gold;
}
}
Advanced Usage
When using modifiers that change the same or a more specific css property these must be grouped by breakpoint.
A more specific property would be something like padding-top
to padding
.
// Wrap your code like this to have your modifiers grouped by breakpoint
@include variants('responsive') using ($props...) {
.p-1 {
@include variants($props...) {
padding: 0.25rem;
}
}
.pt-1 {
@include variants($props...) {
padding-top: 0.25rem;
}
}
}
Performance
1.0.0-rc.5
3 years ago
1.0.0-rc.6
3 years ago
1.0.0-rc.4
3 years ago
1.0.0-rc.3
3 years ago
1.0.0-rc.2
3 years ago
1.0.0-rc.1
3 years ago
1.0.0-rc.0
3 years ago