Repository navigation
Add tests for UA styles of text-transform - #17152
Conversation
This behavior has been implemented by many user agents and supported by web developers via various "CSS normalizing" libraries. Motivating issue: whatwg#1310 Tests: web-platform-tests/wpt#17152
This behavior has been implemented by many user agents and supported by web developers via various "CSS normalizing" libraries. Motivating issue: whatwg#1310 Tests: web-platform-tests/wpt#17152 Implementation in normalize.css: https://github.com/necolas/normalize.css Implementation in sanitize.css: https://github.com/csstools/sanitize.css Implementation in marx: https://github.com/mblode/marx Implementation in WebKit: https://github.com/WebKit/webkit/blob/89c28d471fae35f1788a0f857067896a10af8974/Source/WebCore/css/html.css#L360 Implementation in Chromium: https://chromium.googlesource.com/chromium/src/+/9b0f9c1/third_party/blink/renderer/core/html/resources/html.css#406
|
Spec patch here: whatwg/html#4672 |
|
The test could pass if there was no effect of You could add a test that sets In addition, a testharness.js test that tests |
…hrough for input, textarea, button and select, for compat with other UAs. r=mats There should be no change in behavior for <input> and <textarea>. Tests need to be written for <button> and <select>. Tests are at web-platform-tests/wpt#17152 Differential Revision: https://phabricator.services.mozilla.com/D43221 --HG-- extra : moz-landing-system : lando
…hrough for input, textarea, button and select, for compat with other UAs. r=mats There should be no change in behavior for <input> and <textarea>. Tests need to be written for <button> and <select>. Tests are at web-platform-tests/wpt#17152 Differential Revision: https://phabricator.services.mozilla.com/D43221
|
@emilio can you review? |
| const refStyle = getComputedStyle(clone); | ||
| for (const prop of props) { | ||
| test(() => { | ||
| assert_equals(testStyle.getPropertyValue(prop), refStyle.getPropertyValue(prop)); |
There was a problem hiding this comment.
Kinda over-complicated compared to just checking the value with and without property: initial matches, but I guess this is ok.
There was a problem hiding this comment.
This approach is generalizes to any value, not just initial though. My idea is to try to test most of the rendering section like this. See #5625 (comment)
There was a problem hiding this comment.
Sounds good :)
FWIW, there's some failures when I run this test locally in both Chrome and Firefox (<select multiple> has white-space: nowrap for example).
I haven't checked WebKit, but if they match Blink it may be worth fixing this test before landing.
There was a problem hiding this comment.
Some common failures, I mean.
…'t test unrelated properties. Improve test names, add some new tests.
b4dcbf1 to
3ac7cc5
Compare
|
Rebased to see if that makes the Taskcluster check green. |
This behavior for text-transform has been implemented by many user agents and supported by web developers via various "CSS normalizing" libraries. Also align with WebKit and Blink on resetting other properties in the UA stylesheet, and align with WebKit/Blink/Gecko with having text-align: center on buttons. Fixes #1310, fixes #4676. Tests: web-platform-tests/wpt#17152
…hrough for input, textarea, button and select, for compat with other UAs. r=mats There should be no change in behavior for <input> and <textarea>. Tests need to be written for <button> and <select>. Tests are at web-platform-tests/wpt#17152 Differential Revision: https://phabricator.services.mozilla.com/D43221 UltraBlame original commit: 3db1abb6e436926e67d3dedefeed38fbb1faca01
…hrough for input, textarea, button and select, for compat with other UAs. r=mats There should be no change in behavior for <input> and <textarea>. Tests need to be written for <button> and <select>. Tests are at web-platform-tests/wpt#17152 Differential Revision: https://phabricator.services.mozilla.com/D43221 UltraBlame original commit: 3db1abb6e436926e67d3dedefeed38fbb1faca01
…hrough for input, textarea, button and select, for compat with other UAs. r=mats There should be no change in behavior for <input> and <textarea>. Tests need to be written for <button> and <select>. Tests are at web-platform-tests/wpt#17152 Differential Revision: https://phabricator.services.mozilla.com/D43221 UltraBlame original commit: 3db1abb6e436926e67d3dedefeed38fbb1faca01
This behavior for text-transform has been implemented by many user agents and supported by web developers via various "CSS normalizing" libraries. Also align with WebKit and Blink on resetting other properties in the UA stylesheet, and align with WebKit/Blink/Gecko with having text-align: center on buttons. Fixes #1310, fixes #4676. Tests: web-platform-tests/wpt#17152
…hrough for input, textarea, button and select, for compat with other UAs. r=mats There should be no change in behavior for <input> and <textarea>. Tests need to be written for <button> and <select>. Tests are at web-platform-tests/wpt#17152 Differential Revision: https://phabricator.services.mozilla.com/D43221
No description provided.