Beginner CSS Flashcards

1
Q

What are CSS custom variables?

A

They’re a powerful tool that allow you to change multiple values at once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the syntax for CSS variables?

A

Double hyphen–

Example: –penguin: black;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does var work in CSS when it comes to variables?

A

You can assign its value to other properties by referencing the name. It will change whatever element you are targeting to match its value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the syntax for the var CSS variables?

A

var(–choosewhateverclassname): black;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a fallback value? What is the syntax?

A

The value that will be reverted to if the variable is not found.
background: var(–randomclassname, black);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is :root?

A

It’s a pseudo class selector. Variables inside of it will be available globally and can be access from any other selector

How well did you know this?
1
Not at all
2
3
4
5
Perfectly