diff --git a/curriculum/challenges/english/25-front-end-development/quiz-css-colors/66ed8fe1f45ce3ece4053eb1.md b/curriculum/challenges/english/25-front-end-development/quiz-css-colors/66ed8fe1f45ce3ece4053eb1.md index 449e3fe6e76f01..f8f31ec1f5682d 100644 --- a/curriculum/challenges/english/25-front-end-development/quiz-css-colors/66ed8fe1f45ce3ece4053eb1.md +++ b/curriculum/challenges/english/25-front-end-development/quiz-css-colors/66ed8fe1f45ce3ece4053eb1.md @@ -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) ```