Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Fix formal syntax of text-decoration-skip to fit current CSS Text Dec…
…oration Module Level 3 [CR]

[CSS Text Decoration Module Level 3](https://www.w3.org/TR/css-text-decor-3/#text-decoration-skip-property)
  • Loading branch information
toptalo committed Dec 29, 2017
commit e98b484ed7d52ec78d3c42fa792728fe43d7e675
4 changes: 2 additions & 2 deletions src/css/Properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ var Properties = module.exports = {
"text-decoration-color" : "<text-decoration-color>",
"text-decoration-line" : "<text-decoration-line>",
"text-decoration-style" : "<text-decoration-style>",
"text-decoration-skip" : "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
"-webkit-text-decoration-skip" : "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
"text-decoration-skip" : "none | [ objects || spaces || ink || edges || box-decoration ]",
Copy link
Contributor

Choose a reason for hiding this comment

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

The formal syntax in English differs from the version on the Russian translation.

none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]

Can you check which is more up2date?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I Update Formal Syntax. Get it in Specification

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, MDN finally confused me =)
There are CSS Text Decoration Module Level 3 [CR] That has formal syntax none | [ objects || spaces || ink || edges || box-decoration ]

And CSS Text Decoration Module Level 4 [ED] with formal syntax none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]

I Think, it will be better to to use [CR] formal syntax instead [ED] version

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, sounds good.

"-webkit-text-decoration-skip" : "none | [ objects || spaces || ink || edges || box-decoration ]",
"text-emphasis" : 1,
"text-height" : 1,
"text-indent" : "<length> | <percentage>",
Expand Down
20 changes: 10 additions & 10 deletions tests/css/Validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1494,16 +1494,16 @@ var YUITest = require("yuitest"),
valid: [
"none",
"objects",
"spaces",
"ink",
"edges",
"box-decoration",
"spaces",
"leading-spaces trailing-spaces",
"objects leading-spaces trailing-spaces",
"objects edges box-decoration"
"objects spaces ink"
],

invalid: {
"foo" : "Expected (none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]) but found 'foo'."
"none objects" : "Expected end of value but found 'objects'.",
"foo" : "Expected (none | [ objects || spaces || ink || edges || box-decoration ]) but found 'foo'."
}
}));

Expand All @@ -1513,16 +1513,16 @@ var YUITest = require("yuitest"),
valid: [
"none",
"objects",
"spaces",
"ink",
"edges",
"box-decoration",
"spaces",
"leading-spaces trailing-spaces",
"objects leading-spaces trailing-spaces",
"objects edges box-decoration"
"objects spaces ink"
],

invalid: {
"foo" : "Expected (none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]) but found 'foo'."
"none objects" : "Expected end of value but found 'objects'.",
"foo" : "Expected (none | [ objects || spaces || ink || edges || box-decoration ]) but found 'foo'."
}
}));

Expand Down