mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Supports specifying background colors as an array of colors, or an object where the label is what you want to name that color as a background utility, and the value is the color to use. Everything can be specified as either camelCase or kebab-case so you don't need to quote the shit out of everything but classes will always be rendered as kebab-case.
28 lines
375 B
Plaintext
28 lines
375 B
Plaintext
.foo {
|
|
@class "bg-light px-4";
|
|
background-color: red;
|
|
@media (--breakpoint-sm) {
|
|
@class "py-2";
|
|
background-color: green;
|
|
}
|
|
@media (--breakpoint-md) {
|
|
background-color: orange;
|
|
}
|
|
}
|
|
|
|
@tailwind utilities;
|
|
|
|
.bg-light {
|
|
background: #fff;
|
|
}
|
|
|
|
.px-4 {
|
|
padding-right: 1rem;
|
|
padding-left: 1rem;
|
|
}
|
|
|
|
.py-2 {
|
|
padding-top: .5rem;
|
|
padding-bottom: .5rem;
|
|
}
|