Serialize font-stretch values correctly in the font shorthand
Per the CSS Fonts 4 spec [1], only keyword values for font-stretch are valid in the font shorthand. Our current serialization code ignores this, and outputs percentage values as well in the shorthand, meaning that the generated rule cannot be reparsed. We now check if the percentage can be converted to a keyword, and if so, output it as that keyword. Otherwise, we do not output a serialization for the font shorthand, as per the CSSOM spec [2]. [1]: https://drafts.csswg.org/css-fonts-4/#font-prop [2]: https://drafts.csswg.org/cssom/#serializing-css-values Bug: 850092 Change-Id: I7e3eec64723966b15abfa819213b95cba6cbc3d5 Reviewed-on: https://chromium-review.googlesource.com/1103856 Commit-Queue: Dominik Röttsches <drott@chromium.org> Reviewed-by:Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#568383}
Showing
Please register or sign in to comment