mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 02:47:34 +00:00
LibWeb: Add range-checking to property_accepts_value()
For `number` and `integer` types, you can add a range afterwards to add a range check, using similar syntax to that used in the CSS specs. For example: ```json "font-weight": { ... "valid-types": [ "number [1,1000]" ], ... } ``` This limits any numbers to the range `1 <= n <= 1000`.
This commit is contained in:
parent
e262596ee1
commit
b927972da7
4 changed files with 31 additions and 3 deletions
|
@ -668,7 +668,7 @@
|
|||
"inherited": true,
|
||||
"initial": "normal",
|
||||
"valid-types": [
|
||||
"integer"
|
||||
"number [1,1000]"
|
||||
],
|
||||
"valid-identifiers": [
|
||||
"bold",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue