feat(curriculum): add interactive examples to css variables (#65373)

Co-authored-by: Jeevankumar-S <jeevenkumar2003@email.com>
Co-authored-by: zaira <zairahira@gmail.com>
This commit is contained in:
Jeevankumar S
2026-01-30 15:46:53 +05:30
committed by GitHub
parent 13f18b83d0
commit f3d1df4ce5

View File

@@ -5,7 +5,7 @@ challengeType: 31
dashedName: review-css-variables
---
# --description--
# --interactive--
## CSS Custom Properties (CSS Variables)
@@ -46,7 +46,11 @@ body {
- **`initial-value`**: This sets the default value of the property.
- **Gradient Example Using the `@property` Rule**: This example creates a gradient that smoothly animates when the element is hovered over.
:::interactive_editor
```html
<link rel="stylesheet" href="styles.css">
<div class="gradient-box"></div>
```
@@ -69,6 +73,8 @@ body {
}
```
:::
- **Fallbacks**: When using the custom property, you can provide a fallback value using the `var()` function, just as you would with standard custom properties:
```css