mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): fix definition of custom property (#65533)
This commit is contained in:
+2
-2
@@ -21,9 +21,9 @@ The basic syntax of the `@property` rule is as follows:
|
||||
}
|
||||
```
|
||||
|
||||
The `--property-name` is the name of the custom property you're defining. Like all custom properties, it must start with two dashes. `--property-name` can be things like `<color>`, `<length>`, `<number>`, `<percentage>`, or more complex types.
|
||||
The `--property-name` is the name of the custom property you're defining. Like all custom properties, it must start with two dashes.
|
||||
|
||||
`syntax` defines the type of the property.
|
||||
`syntax` defines the type of the property, which can be things like `<color>`, `<length>`, `<number>`, `<percentage>`, or more complex types.
|
||||
|
||||
`inherits` specifies whether the property should inherit its value from its parent element.
|
||||
|
||||
|
||||
+2
-2
@@ -40,8 +40,8 @@ body {
|
||||
}
|
||||
```
|
||||
|
||||
- **`--property-name`**: This is the name of the custom property you're defining. Like all custom properties, it must start with two dashes. `--property-name` can be things like `<color>`, `<length>`, `<number>`, `<percentage>`, or more complex types.
|
||||
- **`syntax`**: This defines the type of the property.
|
||||
- **`--property-name`**: This is the name of the custom property you're defining. Like all custom properties, it must start with two dashes.
|
||||
**`syntax`**: This defines the type of the property, which can be things like `<color>`, `<length>`, `<number>`, `<percentage>`, or more complex types.
|
||||
- **`inherits`**: This specifies whether the property should inherit its value from its parent element.
|
||||
- **`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.
|
||||
|
||||
@@ -526,8 +526,8 @@ Using placeholder text is not great for accessibility. Too often, users confuse
|
||||
}
|
||||
```
|
||||
|
||||
- **`--property-name`**: This is the name of the custom property you're defining. Like all custom properties, it must start with two dashes. `--property-name` can be things like `<color>`, `<length>`, `<number>`, `<percentage>`, or more complex types.
|
||||
- **`syntax`**: This defines the type of the property.
|
||||
- **`--property-name`**: This is the name of the custom property you're defining. Like all custom properties, it must start with two dashes.
|
||||
**`syntax`**: This defines the type of the property, which can be things like `<color>`, `<length>`, `<number>`, `<percentage>`, or more complex types.
|
||||
- **`inherits`**: This specifies whether the property should inherit its value from its parent element.
|
||||
- **`initial-value`**: This sets the default value of the property.
|
||||
- **Fallbacks**: When using the custom property, you can provide a fallback value using the `var()` function, just as you would with standard custom properties.
|
||||
|
||||
Reference in New Issue
Block a user