fix: 19th and 20th questions replaced (#58067)
Some checks failed
i18n - Build Validation / Validate i18n Builds (20.x) (push) Has been cancelled
CI - Node.js / Lint (20.x) (push) Has been cancelled
CI - Node.js / Build (20.x) (push) Has been cancelled
CI - Node.js / Test (20.x) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (20.x) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 20.x) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 20.x) (push) Has been cancelled
i18n - Download Client UI / Client (push) Has been cancelled

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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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)
```