Styling Your Applications
Learn what CSS-in-JS is and how to apply it to your web apps with the Emotion library.
StartKey Concepts
Review core concepts you need to learn to master this subject
The css
Prop
The css
Prop
// object styles
<div
css={{
backgroundColor: 'rebeccapurple',
}}
>
Content to Display
</div>
// tagged template literals
<div
css={css`
background-color: rebeccapurple;
`}
>
Content to Display
</div>
In Emotion, the css
prop is used to style elements. It can be used with object styles and tagged template literals.
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory