Fully customizable utility generator and CSS framework to help you gain the full power of both utility-first and Sass.
npm install uniformcss
@use "uniform" as * with (
$config: (
delimiter: '-',
important: true,
colors: (
btn: #0054CB,
btn-hover: #0046A8
),
utilities: (
display: (
shorthand: null,
responsive: true
variants: (
block: block,
flex: flex
)
)
)
)
);
.btn {
@include apply('inline-flex align-items-center justify-content-center h-40 px-14 radius-md color-white semibold bg-btn-600 hover.bg-btn-hover focus.shadow-focus transition-100');
&__fluid {
@include apply('w-100p')
}
}
Infuse any Sass-built project with the power of utility-first CSS. Fully configure directly in Sass, or add helpful utilities progressively without requiring a complete project overhaul.
Infuse any Sass-built project with the power of utility-first CSS. Fully configure directly in Sass, or add helpful utilities progressively without requiring a complete project overhaul.
Say goodbye to lingering legacy stylesheets and enjoy building scalable UI without ever worrying about CSS bloat.
Try on Codepen
Enter your email and password
Reviewed the invoice and sent to tom@lorem.com
Reviewed the invoice and sent to tom@lorem.com
Attach prefixes, change shorthands, remove delimiters, enable responsiveness, override variants. Control every aspect of how utilities are generated.
How to customize
@use "uniform" as * with (
$config: (
utilities: (
margin-top: (
// `shorthand` is the keyword used to represent the CSS property e.g. `mt-1`, `mt-2`
shorthand: mt
),
margin-right: (
// e.g. `marginRight-1`, `marginRight-2`
shorthand: marginRight
)
),
// Exclude all CSS properties in the output.
excludes: (
all
),
// Only include `margin-top` and `margin-right CSS properties in the output.
includes: (
margin-top,
margin-right
)
)
);
.mt-1 {
margin-top: 0.0625rem;
}
.mt-2 {
margin-top: 0.125rem;
}
.mt-4 {
margin-top: 0.25rem;
}
.marginRight-1 {
margin-right: 0.0625rem;
}
.marginRight-2 {
margin-right: 0.125rem;
}
.marginRight-4 {
margin-right: 0.25rem;
}
...
Enjoy every bit of Sass. Uniform provides apply extrapolation, helper theme functions, and Sass mixins to help you be even more productive.
See how it works
@use "uniform" as *;
.block {
@include apply('overflow-hidden radius-sm');
&__element {
@include apply('flex align-items-center h-40 px-12 shadow-2xs radius-sm p-24 md.p-64');
&--modifier {
@include apply('w-100p radius-none')
}
}
}
.block {
overflow: hidden;
border-radius: var(--radius-sm);
}
.block__element {
display: flex;
align-items: center;
height: 2.5rem;
padding-left: 0.75rem;
padding-right: 0.75rem;
box-shadow: var(--shadow-2xs);
border-radius: var(--radius-sm);
padding: 1.5rem;
}
@media (min-width: 1024px) {
.block__element {
padding: 4rem;
}
}
.block__element--modifier {
width: 100%;
border-radius: 0;
}
Fully customizable utilities-class generator and CSS framework to help you quickly generate just the utilities you need directly in Sass.