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 cosmic_text to render the text, so it mostly depends on the features that these two libraries support.

But for 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-helpers or Style struct to see how structured values are parsed.

Compatibility Matrix

PropertyProperty ExpandedSupported ValuesInherited
displaySupportedNo
positionSupportedNo
widthSupportedNo
heightSupportedNo
maxWidthSupportedNo
maxHeightSupportedNo
minWidthSupportedNo
minHeightSupportedNo
aspectRatioSupportedNo
paddingpaddingTop, paddingRight, paddingBottom, paddingLeftSupportedNo
marginmarginTop, marginRight, marginBottom, marginLeftSupportedNo
insettop, right, bottom, leftSupportedNo
borderWidthborderWidthTop, borderWidthRight, borderWidthBottom, borderWidthLeftSupportedNo
flexDirectionSupportedNo
justifyContentSupportedNo
alignContentSupportedNo
justifyItemsSupportedNo
alignItemsSupportedNo
alignSelfSupportedNo
flexWrapSupportedNo
flexBasisSupportedNo
flexGrowSupportedNo
flexShrinkSupportedNo
gapSupportedNo
objectFitSupportedNo
backgroundImageSupportedNo
backgroundColorSupportedNo
boxShadowSupportedNo
gridAutoColumnsSupportedNo
gridAutoRowsSupportedNo
gridAutoFlowSupportedNo
gridColumnSupportedNo
gridRowSupportedNo
gridTemplateColumnsSupportedNo
gridTemplateRowsSupportedNo
gridTemplateAreasSupportedNo
borderRadiusborderRadiusTop, borderRadiusRight, borderRadiusBottom, borderRadiusLeftSupportedYes
boxSizingSupportedYes
textOverflowSupportedYes
textTransformSupportedYes
textStyleSupportedYes
borderColorSupportedYes
colorSupportedYes
fontSizeSupportedYes
fontFamilySupportedYes
lineHeightSupportedYes
fontWeightSupportedYes
lineClampSupportedYes
textAlignSupportedYes
letterSpacingSupportedYes
imageRenderingSupportedYes