Crates.io | tailwind-css |
lib.rs | tailwind-css |
version | 0.12.7 |
source | src |
created_at | 2022-01-17 17:26:13.219778 |
updated_at | 2023-11-27 04:03:38.649675 |
description | Compile tailwind short instructions to css |
homepage | |
repository | https://github.com/oovm/tailwind-rs |
max_upload_size | |
id | 515693 |
size | 456,889 |
Tailwind style tracer, JIT + AOT Interpreter!
use tailwind_css::TailwindBuilder;
fn build() {
let mut tailwind = TailwindBuilder::default();
// The compiler will expand directly into the final css property
// Inline style will not be tracked
let inline = tailwind.inline("py-2 px-4 bg-green-500");
// The compiler will expand into a `class`, and record the style class used
tailwind.trace("py-2 px-4 bg-green-500", false);
// Compile all traced classes into bundle
let bundle = tailwind.bundle();
}
This library is not strictly implemented according to the original version.
Especially when some writing methods can be simplified or generalized.
For example arbitrary values of z-index
needs brackets, but rs version does not.
z-[100]
z-100
For example, there are style overrides in p-auto px-px pt-2 pb-2
.
In inline mode, the latter will overwrite the former, and finally get padding:.5rem 1px
In Bundle mode, the final result depends on the browser.
tailwind-rs needs your help!
A lot of documentation and test cases are missing, you are welcome to pr!
See the tests
folder for details.
TailwindAspect
]TailwindContainer
]TailwindColumns
]TailwindBreakAfter
]TailwindBreakBefore
]TailwindBreakInside
]TailwindBoxDecoration
]TailwindBoxSize
]TailwindDisplay
]TailwindFloat
]TailwindClear
]TailwindIsolation
]TailwindObjectFit
]TailwindObjectPosition
]TailwindOverflow
]TailwindOverscroll
]TailwindPosition
]TailwindInset
]TailwindLeft
]TailwindRight
]TailwindTop
]TailwindBottom
]TailwindVisibility
]TailwindZIndex
]TailwindBasis
]TailwindFlexDirection
]TailwindFlexWrap
]TailwindFlex
]TailWindGrow
]TailWindShrink
]TailWindOrder
]TailwindGridColumns
]TailwindGridRows
]TailwindColumn
]TailwindRow
]TailwindGridFlow
]TailwindGridAuto
]TailwindGridAuto
]TailwindGap
]TailwindJustifyContent
]TailwindJustifyItems
]TailwindJustifySelf
]TailwindContent
]TailwindContent
]TailwindItems
]TailwindPlaceContent
]TailwindPlaceItems
]TailwindPlaceSelf
]TailwindSizing
]TailwindSizing
]TailwindSizing
]TailwindSizing
]TailwindSizing
]TailwindSizing
]TailwindFontFamily
]TailwindFontSize
]FontSmoothing
]TailwindFontStyle
]TailwindFontWeight
]TailwindFontVariantNumeric
]TailwindTracking
]TailwindLeading
]TailwindListStyle
]TailwindListPosition
]TailwindTextAlignment
]TailwindTextColor
]TailwindDecoration
]TailwindDecorationColor
]TailwindDecorationThickness
]TailwindSizing
]TailwindUnderlineOffset
]TailwindTextTransform
]TailwindOverflow
]TailwindIndent
]TailwindAlign
]TailwindWhiteSpace
]TailwindBreak
]TailwindContent
]TailwindBackgroundAttachment
]TailwindBackgroundClip
]TailwindBackgroundColor
]TailwindBackgroundOrigin
]TailwindBackgroundPosition
]TailwindBackgroundRepeat
]TailwindBackgroundSize
]TailwindBackgroundImage
]TailwindFrom
]TailwindVia
]TailwindTo
]TailwindRounded
]TailwindBorderWidth
]TailwindBorderColor
]TailwindBorderStyle
]TailwindDivideWidth
]TailwindDivideColor
]TailwindDivideStyle
]TailwindOutlineWidth
]TailwindOutlineColor
]TailwindOutlineStyle
]TailwindRingWidth
]TailwindRingColor
]TailwindRingOffsetWidth
]TailwindRingOffsetColor
]TailwindShadow
]TailwindShadowColor
]TailwindOpacity
]TailwindBlend
]TailwindBackgroundBlend
]TailwindBlur
]TailwindBrightness
]TailwindContrast
]TailwindShadow
]TailwindGrayscale
]TailwindHueRotate
]TailwindInvert
]TailwindSaturate
]TailwindSepia
]TailwindBlur
]TailwindBrightness
]TailwindContrast
]TailwindGrayscale
]TailwindHueRotate
]TailwindInvert
]TailwindOpacity
]TailwindSaturate
]TailwindSepia
]TailwindBorderCollapse
]TailwindTableLayout
]TailwindTransition
]TailwindDuration
]TailwindEase
]TailwindDelay
]TailwindAnimate
]TailwindScale
]TailwindRotate
]TailwindTranslate
]TailwindSkew
]TailwindOrigin
]TailwindAccentColor
]TailwindAppearance
]TailwindCursor
]TailwindCaretColor
]TailwindPointerEvents
]TailwindResize
]TailwindOverscroll
]TailwindScrollMargin
]TailwindScrollPadding
]TailwindSnapAlign
]TailwindSnapStop
]TailwindSnapType
]TailwindTorch
]TailwindSelect
]TailwindWillChange
]TailwindFillColor
]TailwindStrokeColor
]TailwindStrokeWidth
]TailwindScreenReader
]