[Basic CSS] Is this a typo or formatting error?

In the lesson, Learn Basic CSS: Inherit CSS Variables, the text “element.” is using a monospaced font. It also seems like a word is missing before it.

Here’s a screenshot:

I think it’s just missing the word root.

To make use of inheritance, CSS variables are often defined in the root element.

Here’s an example of defining variables in the root element

:root {
  --blue: #1e90ff;
  --white: #ffffff;
}

Then using those variables:

h2 { border-bottom: 2px solid var(--blue); }

.container {
  color: var(--blue);
  background-color: var(--white);
  padding: 15px;
}
1 Like

there should be “To make use of inheritance, CSS variables are often defined in the :root element:”

there is an issue with the parser, it doesn’t like “:root”, it is being worked on

1 Like