From a2b38d51f5572a8300476ef1b3b50cd110a89557 Mon Sep 17 00:00:00 2001 From: toptalo Date: Wed, 10 Jan 2018 13:35:03 +0300 Subject: [PATCH] Add `text-underline-position-property` to fit current CSS Text Decoration Module Level 3 [CR] [CSS Text Decoration Module Level 3](https://www.w3.org/TR/css-text-decor-3/#text-underline-position-property) --- src/css/Properties.js | 1 + tests/css/Validation.js | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/css/Properties.js b/src/css/Properties.js index 053de93d..4826c0e1 100644 --- a/src/css/Properties.js +++ b/src/css/Properties.js @@ -437,6 +437,7 @@ var Properties = module.exports = { "text-decoration-style" : "", "text-decoration-skip" : "none | [ objects || spaces || ink || edges || box-decoration ]", "-webkit-text-decoration-skip" : "none | [ objects || spaces || ink || edges || box-decoration ]", + "text-underline-position" : "auto | [ under || [ left | right ] ]", "text-emphasis" : 1, "text-height" : 1, "text-indent" : " | ", diff --git a/tests/css/Validation.js b/tests/css/Validation.js index d6a19650..da1d524b 100644 --- a/tests/css/Validation.js +++ b/tests/css/Validation.js @@ -1518,7 +1518,7 @@ var YUITest = require("yuitest"), "edges", "box-decoration", "objects spaces ink" - ], + ], invalid: { "none objects" : "Expected end of value but found 'objects'.", @@ -1526,6 +1526,24 @@ var YUITest = require("yuitest"), } })); + suite.add(new ValidationTestCase({ + property: "text-underline-position", + + valid: [ + "auto", + "under", + "left", + "right", + "under left" + ], + + invalid: { + "auto under" : "Expected end of value but found 'under'.", + "left right" : "Expected end of value but found 'right'.", + "foo" : "Expected (auto | [ under || [ left | right ] ]) but found 'foo'." + } + })); + suite.add(new ValidationTestCase({ property: "text-rendering",