What CSS features and properties does satori support?
This post might have stale content, as HEAD is 12 commits ahead.
What CSS features does satori support? What are all the supported CSS properties?
Perfect! I found comprehensive information about the CSS features supported by Satori. Let me provide you with a complete summary based on the README documentation.
##CSS Features Supported by Satori
Satori supports a subset of CSS properties that are static and visible. It uses the same Flexbox layout engine as React Native (Yoga Layout) and does not implement the complete CSS specification.
###Important Limitations:
- No 3D transforms
- No
z-indexsupport (elements later in document render on top) - No
calc()function currentColoronly works for thecolorproperty- RTL languages not supported
- Advanced typography features (kerning, ligatures, OpenType features) not supported
###Complete List of Supported CSS Properties:
####Layout & Display
display:flex,contents,none(defaults toflex)position:relative,static,absolute(defaults torelative)
####Spacing
margin,marginTop,marginRight,marginBottom,marginLefttop,right,bottom,left
####Sizing
width,heightminWidth,minHeight,maxWidth,maxHeight(exceptmin-content,max-content,fit-content)
####Border
- Width:
borderWidth,borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth - Style:
borderStyle,borderTopStyle, etc. (solid,dashed) - Color:
borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor - Shorthand:
border,borderTop,borderRight,borderBottom,borderLeft
####Border Radius
borderTopLeftRadius,borderTopRightRadius,borderBottomLeftRadius,borderBottomRightRadius- Shorthand:
borderRadius(e.g.,5px,50% / 5px)
####Flexbox
flexDirection:column,row,row-reverse,column-reverse(defaults torow)flexWrap:wrap,nowrap,wrap-reverse(defaults towrap)flexGrow,flexShrinkflexBasis(exceptauto)alignItems:stretch,center,flex-start,flex-end,baseline,normal(defaults tostretch)alignContent,alignSelfjustifyContentgap
####Font
fontFamilyfontSizefontWeightfontStyle
####Text
colortabSizetextAlign:start,end,left,right,center,justify(defaults tostart)textTransform:none,lowercase,uppercase,capitalize(defaults tonone)textOverflow:clip,ellipsis(defaults toclip)textDecoration: line types (underline,line-through), styles (dotted,dashed,double,solid)textShadowlineHeightletterSpacingwhiteSpace:normal,pre,pre-wrap,pre-line,nowrap(defaults tonormal)wordBreak:normal,break-all,break-word,keep-all(defaults tonormal)textWrap:wrap,balance(defaults towrap)
####Background
backgroundColor(single value)backgroundImage:linear-gradient,repeating-linear-gradient,radial-gradient,repeating-radial-gradient,url()backgroundPosition(single value)backgroundSize(two-value size like10px 20%)backgroundClip:border-box,textbackgroundRepeat:repeat,repeat-x,repeat-y,no-repeat(defaults torepeat)
####Transform
translate,translateX,translateYrotatescale,scaleX,scaleYskew,skewX,skewYtransformOrigin(one-value and two-value syntax, both relative and absolute)
####Images
objectFit:contain,cover,none(defaults tonone)objectPosition: keywords (top,bottom,left,right,center) and combinations (defaults tocenter)
####Effects & Styling
opacityboxSizingboxShadowoverflow:visible,hidden(defaults tovisible)filterclipPathlineClamp
####Mask
maskImage:linear-gradient(),radial-gradient(),url()maskPositionmaskSize(two-value size like10px 20%)maskRepeat:repeat,repeat-x,repeat-y,no-repeat(defaults torepeat)
####WebKit Extensions
WebkitTextStrokeWidthWebkitTextStrokeColor
You can find more details in the main documentation file at src/handler/presets.ts which contains the HTML element presets.
END OF POST