mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 18:18:27 -05:00
fix(curriculum): change type-checking question with new one (#64525)
Co-authored-by: majestic-owl448 <26656284+majestic-owl448@users.noreply.github.com>
This commit is contained in:
@@ -763,31 +763,31 @@ Only applies within `.dark-theme` scope.
|
||||
|
||||
#### --text--
|
||||
|
||||
Which part of this `@property` declaration enforces type checking?
|
||||
In the following CSS, what happens if a user tries to assign an invalid value to `--padding` (for example, a color instead of a length)?
|
||||
|
||||
```css
|
||||
@property --my-color {
|
||||
syntax: "<color>";
|
||||
@property --padding {
|
||||
syntax: "<length>";
|
||||
initial-value: 0px;
|
||||
inherits: false;
|
||||
initial-value: red;
|
||||
}
|
||||
```
|
||||
|
||||
#### --distractors--
|
||||
|
||||
`initial-value`
|
||||
The browser accepts the value but ignores it during layout.
|
||||
|
||||
---
|
||||
|
||||
`inherits`
|
||||
The browser throws a runtime error.
|
||||
|
||||
---
|
||||
|
||||
`--my-color`
|
||||
The browser converts the value to a valid length automatically.
|
||||
|
||||
#### --answer--
|
||||
|
||||
`syntax`
|
||||
The browser falls back to the property's initial value.
|
||||
|
||||
### --question--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user