CSS

The language that describes how web pages look: colours, fonts, spacing, layout and animation.

In more detail

CSS stands for Cascading Style Sheets. A stylesheet is a list of rules; each rule has a selector that picks elements and declarations that set properties on them. When several rules set the same property, the cascade decides which wins, based on origin, specificity and order.

Examples

In the browser: CSS stands for Cascading Style Sheets. Rules pair a selector, which picks elements, with declarations such as color: red. When several rules target the same element, the cascade decides which value wins.
A locator such as .btn-primary breaks after a restyle; getByRole("button") does not.
In React you set the class with the className prop; modals often need portals because parent CSS can clip them.

Related terms

Taught in

References