1
Fork 0
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:
Sam Atkins 2021-09-23 12:45:08 +01:00 committed by Andreas Kling
parent e262596ee1
commit b927972da7
4 changed files with 31 additions and 3 deletions

View file

@ -668,7 +668,7 @@
"inherited": true,
"initial": "normal",
"valid-types": [
"integer"
"number [1,1000]"
],
"valid-identifiers": [
"bold",