Propriétés CSS
Chaque nom de propriété accepté par le compilateur, avec sa catégorie de valeurs. Une propriété non prise en charge fait échouer la compilation.
97 sur 97
color
background
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
background | color, or linear-gradient(<angle> | to <side>, color, color, …) | background: linear-gradient(135deg, #2563eb, #0f172a);Give a header a gradient backdrop. |
opacity
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
opacity | 0–1 | opacity: 0.6;Visually de-emphasize secondary content. |
padding
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
padding | 1–4 non-negative lengths, like CSS | padding: 16px;Add space inside the container. |
paddingSides
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
padding-top | non-negative length | padding-top: 16px;Add space inside the container. |
padding-right | non-negative length | padding-right: 16px;Add space inside the container. |
padding-bottom | non-negative length | padding-bottom: 16px;Add space inside the container. |
padding-left | non-negative length | padding-left: 16px;Add space inside the container. |
padding-horizontal | non-negative length | padding-horizontal: 16px;Add space inside the container. |
padding-vertical | non-negative length | padding-vertical: 16px;Add space inside the container. |
logicalSides
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
padding-inline | a start and an optional end, as their physical sides take; see Right to left | padding-inline: 16px;Add space inside the logical edge of a mirrored layout. |
padding-inline-start | a start and an optional end, as their physical sides take; see Right to left | padding-inline-start: 16px;Add space inside the logical edge of a mirrored layout. |
padding-inline-end | a start and an optional end, as their physical sides take; see Right to left | padding-inline-end: 16px;Add space inside the logical edge of a mirrored layout. |
padding-block | a start and an optional end, as their physical sides take; see Right to left | padding-block: 16px;Add space inside the logical edge of a mirrored layout. |
padding-block-start | a start and an optional end, as their physical sides take; see Right to left | padding-block-start: 16px;Add space inside the logical edge of a mirrored layout. |
padding-block-end | a start and an optional end, as their physical sides take; see Right to left | padding-block-end: 16px;Add space inside the logical edge of a mirrored layout. |
inset-inline | a start and an optional end, as their physical sides take; see Right to left | inset-inline: 8px;Place an absolutely positioned overlay relative to its container. |
inset-inline-start | a start and an optional end, as their physical sides take; see Right to left | inset-inline-start: 8px;Place an absolutely positioned overlay relative to its container. |
inset-inline-end | a start and an optional end, as their physical sides take; see Right to left | inset-inline-end: 8px;Place an absolutely positioned overlay relative to its container. |
inset-block | a start and an optional end, as their physical sides take; see Right to left | inset-block: 8px;Place an absolutely positioned overlay relative to its container. |
inset-block-start | a start and an optional end, as their physical sides take; see Right to left | inset-block-start: 8px;Place an absolutely positioned overlay relative to its container. |
inset-block-end | a start and an optional end, as their physical sides take; see Right to left | inset-block-end: 8px;Place an absolutely positioned overlay relative to its container. |
margin-inline | a start and an optional end, as their physical sides take; see Right to left | margin-inline: 8px;Separate this view from adjacent content. |
margin-inline-start | a start and an optional end, as their physical sides take; see Right to left | margin-inline-start: 8px;Separate this view from adjacent content. |
margin-inline-end | a start and an optional end, as their physical sides take; see Right to left | margin-inline-end: 8px;Separate this view from adjacent content. |
margin-block | a start and an optional end, as their physical sides take; see Right to left | margin-block: 8px;Separate this view from adjacent content. |
margin-block-start | a start and an optional end, as their physical sides take; see Right to left | margin-block-start: 8px;Separate this view from adjacent content. |
margin-block-end | a start and an optional end, as their physical sides take; see Right to left | margin-block-end: 8px;Separate this view from adjacent content. |
size
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
gap | see Layout | gap: 12px;Space children without individual margins. |
row-gap | see Layout | row-gap: 12px;Space children without individual margins. |
column-gap | see Layout | column-gap: 12px;Space children without individual margins. |
width | see Layout | width: 160px;Reserve horizontal space for an image. |
height | see Layout | height: 48px;Give a control a consistent height. |
min-width | see Layout | min-width: 120px;Keep an action from becoming too narrow. |
max-width | see Layout | max-width: 640px;Limit a readable content column. |
min-height | see Layout | min-height: 44px;Keep a row tall enough to interact with. |
max-height | see Layout | max-height: 320px;Bound a panel height. |
aspect-ratio | see Layout | aspect-ratio: 1;Keep an image square. |
position
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
overflow | see Layout | overflow: hidden;Clip children to a container. |
direction | see Layout | direction: rtl;Set a subtree reading direction. |
box-sizing | see Layout | box-sizing: border-box;Include padding and borders in declared size. |
position | see Layout | position: absolute;Position a badge over its parent. |
top | see Layout | top: 8px;Place an absolutely positioned overlay relative to its container. |
right | see Layout | right: 8px;Place an absolutely positioned overlay relative to its container. |
bottom | see Layout | bottom: 8px;Place an absolutely positioned overlay relative to its container. |
left | see Layout | left: 8px;Place an absolutely positioned overlay relative to its container. |
margin-top | see Layout | margin-top: 8px;Separate this view from adjacent content. |
margin-right | see Layout | margin-right: 8px;Separate this view from adjacent content. |
margin-bottom | see Layout | margin-bottom: 8px;Separate this view from adjacent content. |
margin-left | see Layout | margin-left: 8px;Separate this view from adjacent content. |
layoutShorthands
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
inset | see Layout | inset: 8px;Place an absolutely positioned overlay relative to its container. |
margin | see Layout | margin: 8px;Separate this view from adjacent content. |
margin-horizontal | see Layout | margin-horizontal: 8px;Separate this view from adjacent content. |
margin-vertical | see Layout | margin-vertical: 8px;Separate this view from adjacent content. |
flex | see Layout | flex: 1;Fill free space in a stack. |
flex-flow | see Layout | flex-flow: row wrap;Wrap a row of chips. |
flexbox
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
flex-direction | see Layout | flex-direction: row;Arrange content horizontally. |
flex-wrap | see Layout | flex-wrap: wrap;Allow items onto another line. |
flex-grow | see Layout | flex-grow: 1;Allocate remaining space to this child. |
flex-shrink | see Layout | flex-shrink: 0;Keep an icon from shrinking. |
flex-basis | see Layout | flex-basis: 120px;Set the starting size of a flex item. |
flex-line-count | see Layout | flex-line-count: 2;Limit a wrapping flex layout to two lines. |
align-items | see Layout | align-items: center;Center children on the cross axis. |
align-self | see Layout | align-self: stretch;Stretch one child across its container. |
align-content | see Layout | align-content: space-between;Distribute wrapped lines. |
justify-content | see Layout | justify-content: space-between;Separate a row’s leading and trailing content. |
display
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
display | none, flex; hidden takes true or false | display: none;Remove content from layout. |
borderParts
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
border-radius | non-negative length / color | border-radius: 12px;Round a card’s corners. |
corner-radius | non-negative length / color | corner-radius: 12px;Set rounded corners using the native alias. |
border-width | non-negative length / color | border-width: 1px;Set the thickness of an outline. |
border-color | non-negative length / color | border-color: #2563eb;Highlight a selected control. |
border
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
border | <width> solid <color>, in any order, each at most once; or none | border: 1px solid #cbd5e1;Outline a card. |
shadow
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
box-shadow | <x> <y> [blur] <color>; blur is halved into the native radius | box-shadow: 0 4px 12px #00000033;Lift a floating panel visually. |
shadowParts
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
shadow-color | color / length | shadow-color: #00000033;Tint a native shadow. |
shadow-radius | color / length | shadow-radius: 6px;Soften the shadow edge. |
shadow-offset-x | color / length | shadow-offset-x: 0px;Keep a shadow horizontally centered. |
shadow-offset-y | color / length | shadow-offset-y: 4px;Move a shadow below its view. |
textLength
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
font-size | length | font-size: 18px;Set a body label size. |
letter-spacing | length | letter-spacing: 0.5px;Space a short uppercase label. |
fontWeight
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
font-weight | normal, bold, 100–900 | font-weight: 600;Emphasize a section title. |
font
lineHeight
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
line-height | length, or a unitless multiple of the font size | line-height: 1.5;Increase paragraph line spacing. |
textKeywords
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
text-align | left/center/right; none/uppercase/lowercase/capitalize | text-align: center;Center a heading. |
text-transform | left/center/right; none/uppercase/lowercase/capitalize | text-transform: uppercase;Format a short label. |
lineClamp
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
-webkit-line-clamp | whole number (0 = unlimited) | -webkit-line-clamp: 2;Limit a summary to two lines. |
number-of-lines | whole number (0 = unlimited) | number-of-lines: 2;Limit lines through the native alias. |
transform
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
transform | translate(), translateX/Y(), scale(), scaleX/Y(), rotate(deg|rad|turn), none | transform: translateY(8px) scale(0.98);Offset and scale a card without changing layout. |
transformParts
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
translate-x | length; a number; an angle (deg, rad, turn) | translate-x: 8px;Offset a view horizontally. |
translate-y | length; a number; an angle (deg, rad, turn) | translate-y: 8px;Offset a view vertically. |
scale | length; a number; an angle (deg, rad, turn) | scale: 1.05;Enlarge a selected item. |
scale-x | length; a number; an angle (deg, rad, turn) | scale-x: 1.05;Scale only the horizontal axis. |
scale-y | length; a number; an angle (deg, rad, turn) | scale-y: 1.05;Scale only the vertical axis. |
rotate | length; a number; an angle (deg, rad, turn) | rotate: 15deg;Rotate a decorative element. |
transition
| Propriété | Valeurs acceptées | Utilisation |
|---|---|---|
transition | see Transitions | transition: opacity 200ms ease-out;Animate a change in opacity. |