mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-12 22:51:09 +08:00
2.8 KiB
2.8 KiB
StyleProp spec
Background
backgroundColor:stringbackgroundImage:stringbackgroundPosition:stringbackgroundRepeat:stringbackgroundSize:string
BorderTheme
borderColor:stringborderTopColor:stringborderRightColor:stringborderBottomColor:stringborderLeftColor:stringborderStyle:stringborderRadius:numberorstringborderTopLeftRadius:numberorstringborderTopRightRadius:numberorstringborderBottomLeftRadius:numberorstringborderBottomRightRadius:numberorstring
BoxModel
borderWidth:numberorstringborderTopWidth:numberorstringborderRightWidth:numberorstringborderBottomWidth:numberorstringborderLeftWidth:numberorstringboxSizing:oneOf('border-box', 'content-box')display:oneOf('block', 'flex', 'inline', 'inline-block', 'inline-flex')height:numberorstringmargin:numberorstringmarginTop:numberorstringmarginRight:numberorstringmarginBottom:numberorstringmarginLeft:numberorstringpadding:numberorstringpaddingTop:numberorstringpaddingRight:numberorstringpaddingBottom:numberorstringpaddingLeft:numberorstringwidth:numberorstring
Flexbox
alignContent:oneOf('center', 'flex-end', 'flex-start', 'stretch', 'space-around', 'space-between')alignItems:oneOf('baseline', 'center', 'flex-end', 'flex-start', 'stretch')alignSelf:oneOf('auto', 'baseline', 'center', 'flex-end', 'flex-start', 'stretch')flex:stringflexBasis:stringflexDirection:oneOf('column', 'column-reverse', 'row', 'row-reverse')flexGrow:numberflexShrink:numberflexWrap:oneOf('nowrap', 'wrap', 'wrap-reverse')justifyContent:oneOf('center', 'flex-end', 'flex-start', 'space-around', 'space-between')order:number
Layout
- BoxModel
- Flexbox
- Position
Position
position:oneOf('absolute', 'fixed', 'relative')bottom:numberorstringleft:numberorstringright:numberorstringtop:numberorstringzIndex:number
Typographic
direction:oneOf('auto', 'ltr', 'rtl')fontFamily:stringfontSize:stringfontWeight:oneOf('100', '200', '300', '400', '500', '600', '700', '800', '900', 'bold', 'normal')fontStyle:oneOf('normal', 'italic')letterSpacing:stringlineHeight:numberorstringtextAlign:oneOf('auto', 'left', 'right', 'center')textDecoration:oneOf('none', 'underline')textTransform:oneOf('capitalize', 'lowercase', 'none', 'uppercase')wordWrap:oneOf('break-word', 'normal')