Skip to content

Commit

Permalink
[css-ui] expect resolved color in inheritance test
Browse files Browse the repository at this point in the history
getComputedStyle returns the resolved color, not 'invert' or 'auto'
https://drafts.csswg.org/cssom/#resolved-value

outline-color initial value test now passes in Chrome/Firefox/Safari.
Fails Edge, which returns 'invert'.
  • Loading branch information
ericwilligers committed Oct 28, 2018
1 parent 71c05e7 commit c1d06ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions css/css-ui/inheritance.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,22 @@

#container, #target {
outline-style: dotted; /* Avoid outline-width computed style 0 */
color: black;
background: white;
}
</style>
<script>
const mediumWidth = getComputedStyle(reference).borderTopWidth; // e.g. 3px

assert_not_inherited('appearance', 'auto', 'none');
assert_inherited('caret-color', 'auto', 'rgba(42, 53, 64, 0.75)');
assert_inherited('caret-color', 'rgb(0, 0, 0)', 'rgba(42, 53, 64, 0.75)');
assert_inherited('caret-shape', 'auto', 'bar');
assert_inherited('cursor', 'auto', 'pointer');
assert_not_inherited('nav-down', 'auto', '#foo');
assert_not_inherited('nav-left', 'auto', '#foo');
assert_not_inherited('nav-right', 'auto', '#foo');
assert_not_inherited('nav-up', 'auto', '#foo');
assert_not_inherited('outline-color', 'invert', 'rgba(42, 53, 64, 0.75)');
assert_not_inherited('outline-color', 'rgb(0, 0, 0)', 'rgba(42, 53, 64, 0.75)');
assert_not_inherited('outline-offset', '0px', '10px');
assert_not_inherited('outline-style', 'none', 'auto');
assert_not_inherited('outline-width', mediumWidth, '10px');
Expand Down

0 comments on commit c1d06ba

Please sign in to comment.