fix: 19th and 20th questions replaced (#58067)

Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
Co-authored-by: Sem Bauke <sem@freecodecamp.org>
Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>
This commit is contained in:
Stephen Mutheu Muya
2025-01-25 23:26:13 +03:00
committed by GitHub
parent 0c66f2c3f8
commit 1436d89296

View File

@@ -413,91 +413,59 @@ Which color model includes the `hue` component?
#### --text--
Which of the following is the correct syntax to create a CSS variable with a fallback value?
Which color function also allows you to set the opacity of the color?
#### --distractors--
```css
.element {
color: var(--main-color; red);
}
hsl(0, 20%, 30%, 50%)
```
---
```css
.element {
color: var(--main-color);
}
rgb(20, 30, 80, 0.5)
```
---
```css
.element {
color: var(--main-color: red);
}
rgba(20, 30, 80)
```
#### --answer--
```css
.element {
color: var(--main-color, red);
}
hsla(0, 20%, 30%, 50%)
```
### --question--
#### --text--
How can you use CSS variables to dynamically change the color of multiple elements?
Which of the following is the correct way to give an element a top-to-bottom red-to-blue gradient background?
#### --distractors--
```css
:root {
primary-color: blue;
}
.element1, .element2 {
color: --primary-color;
}
background: radial-gradient(red, blue)
```
---
```css
body {
--color: blue;
}
.element1, .element2 {
color: var(color);
}
background: radial-gradient(blue, red)
```
---
```css
:root {
primary: blue;
}
.element1, .element2 {
color: var(--primary);
}
background: linear-gradient(blue, red)
```
#### --answer--
```css
:root {
--primary-color: blue;
}
.element1, .element2 {
color: var(--primary-color);
}
background: linear-gradient(red, blue)
```