TakumiTakumi

Stylesheets

Takumi aims to support a wide range of CSS properties, read this to understand how to use them.

How is it implemented?

Takumi uses Taffy to layout the positions, and Parley to layout the text, so it mostly depends on the features that these two libraries support.

But for transform, box shadow and linear gradient, Takumi has its own implementation.

CSS Properties

We support CSS values parsing or structured values parsing.

You can check the Style interface in @takumi-rs/helpers or Style struct on docs.rs to see how structured values are parsed.

All Supported Properties

PropertyProperty ExpandedSupported Values
displayflex, grid, block, inline
positionrelative, absolute
widthSupported
heightSupported
maxWidthSupported
maxHeightSupported
minWidthSupported
minHeightSupported
aspectRatioSupported
paddingpaddingTop, paddingRight, paddingBottom, paddingLeftSupported
marginmarginTop, marginRight, marginBottom, marginLeftSupported
insettop, right, bottom, leftSupported
borderborderWidth (borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth), borderColorOnly solid style is supported
borderRadiusborderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadiusSupported
flexflexBasisSupported
flexGrowSupported
flexShrinkSupported
FlexboxflexDirectionSupported
justifyContentSupported
justifySelfSupported
alignContentSupported
justifyItemsSupported
alignItemsSupported
alignSelfSupported
justifySelfSupported
flexWrapnowrap, wrap, wrap-reverse
gapSupported
objectFitSupported
objectPositionSupported
BackgroundbackgroundImagelinear-gradient(), radial-gradient(), noise-v1()
backgroundPositionSupported
backgroundSizeSupported
backgroundRepeatSupported
backgroundColorSupported
boxShadowSupported
MaskmaskImageSupported
maskSizeSupported
maskPositionSupported
maskRepeatSupported
transformtranslateOnly 2D is supported
rotate
scale
transformOriginSupported
GridgridAutoColumnsSupported
gridAutoRowsSupported
gridAutoFlowSupported
gridColumnSupported
gridRowSupported
gridTemplateColumnsSupported
gridTemplateRowsSupported
gridTemplateAreasSupported
TypographytextOverflowellipsis, clip, custom character
textTransformnone, uppercase, lowercase, capitalize
fontStyleSupported
colorSupported
textShadowSupported
fontSizeSupported
fontFamilyFont fallback supported
lineHeightSupported
fontWeightSupported
fontVariationSettingsSupported
fontFeatureSettingsSupported
lineClampnumber, 1 "ellipsis character"
textAlignSupported
letterSpacingSupported
wordSpacingSupported
overflowWrapSupported
wordBreakSupported
boxSizingSupported
imageRenderingauto, smooth, pixelated
filterExcept blur() and drop-shadow()
WebkitTextStrokeWebkitTextStrokeWidth, WebkitTextStrokeColorSupported
textDecorationtextDecorationLineunderline, line-through, overline
textDecorationColorSupported