Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generally improved validation and added l10n validation #196

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions css/at-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"additive-symbols": {
"syntax": "[ <integer> && <symbol> ]#",
"media": "all",
"initial": "N/A",
"initial": "notApplicable",
"percentages": "no",
"computed": "asSpecified",
"order": "orderOfAppearance",
Expand Down Expand Up @@ -54,7 +54,7 @@
"prefix": {
"syntax": "<symbol>",
"media": "all",
"initial": "\"\"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it should be "\"\"" since it's a valid CSS value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this so it will place nicely with l10n check. Can bring it back if you want?

"initial": "emptyString",
"percentages": "no",
"computed": "asSpecified",
"order": "uniqueOrder",
Expand All @@ -81,7 +81,7 @@
"suffix": {
"syntax": "<symbol>",
"media": "all",
"initial": "\". \"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it should be "\". \"" since it's a valid CSS value

"initial": "fullStopFollowedBySpace",
"percentages": "no",
"computed": "asSpecified",
"order": "uniqueOrder",
Expand All @@ -90,7 +90,7 @@
"symbols": {
"syntax": "<symbol>+",
"media": "all",
"initial": "N/A",
"initial": "notApplicable",
"percentages": "no",
"computed": "asSpecified",
"order": "orderOfAppearance",
Expand Down Expand Up @@ -379,7 +379,7 @@
"continuous"
],
"initial": "auto",
"percentages": "the zoom factor itself",
"percentages": "zoomFactorItself",
"computed": "autoNonNegativeOrPercentage",
"order": "uniqueOrder",
"status": "standard"
Expand Down Expand Up @@ -415,7 +415,7 @@
"continuous"
],
"initial": "auto",
"percentages": "the zoom factor itself",
"percentages": "zoomFactorItself",
"computed": "autoNonNegativeOrPercentage",
"order": "uniqueOrder",
"status": "standard"
Expand Down Expand Up @@ -472,7 +472,7 @@
"continuous"
],
"initial": "auto",
"percentages": "the zoom factor itself",
"percentages": "zoomFactorItself",
"computed": "autoNonNegativeOrPercentage",
"order": "uniqueOrder",
"status": "standard"
Expand Down
71 changes: 35 additions & 36 deletions css/at-rules.schema.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
{
"definitions": {
"stringOrPropertyList": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"property-reference": {
"comment": "property-reference is an extension to the JSON schema validator. Here it jumps 3 levels up in the hierarchy and tests if a value is an existing key in descriptors. See test/validate-schema.js for implementation details.",
"$data": "3"
}
}
}
]
}
},
"type": "object",
"additionalProperties": {
"type": "object",
Expand All @@ -36,10 +15,10 @@
},
"groups": {
"type": "array",
"minitems": 1,
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "definitions.json#/groupList"
"$ref": "definitions#/enums/names/groups"
}
},
"descriptors": {
Expand Down Expand Up @@ -78,13 +57,41 @@
]
},
"initial": {
"$ref": "#/definitions/stringOrPropertyList"
"anyOf": [
{
"$ref": "definitions#/propertyList"
},
{
"$ref": "definitions#/enums/text/initial"
},
{
"type": "string"
}
]
},
"percentages": {
"$ref": "#/definitions/stringOrPropertyList"
"anyOf": [
{
"$ref": "definitions#/enums/text/percentages"
},
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "properties#/names"
}
}
]
},
"computed": {
"$ref": "#/definitions/stringOrPropertyList"
"anyOf": [
{
"$ref": "definitions#/enums/text/computed"
},
{
"$ref": "definitions#/propertyList"
}
]
},
"order": {
"enum": [
Expand All @@ -93,11 +100,7 @@
]
},
"status": {
"enum": [
"standard",
"nonstandard",
"experimental"
]
"$ref": "definitions#/enums/text/status"
}
},
"required": [
Expand All @@ -112,11 +115,7 @@
}
},
"status": {
"enum": [
"standard",
"nonstandard",
"experimental"
]
"$ref": "definitions#/enums/text/status"
}
},
"required": [
Expand Down
Loading