Object Styles✏️ Edit this page
Writing styles with objects is a powerful pattern built directly into the core of emotion. Instead of writing css properties in
kebab-case like regular css, you write them in
camelCase, for example
background-color would be
backgroundColor. Object styles are especially useful with the css prop because you don't need a css call like with string styles but object styles can also be used with styled.
With the css prop
When numbers are the value of a css property,
px is appended to the number unless it is a css property that is unitless.
Nested arrays are flattened.
Define fallback values for browsers that don't support features with arrays.
You can also use
css with object styles.