-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-ui] Inheritance and initial value (#13095)
Test that CSS Basic User Interface properties inherit. Test that initial values match the spec. https://drafts.csswg.org/css-ui/#property-index
- Loading branch information
1 parent
1e37163
commit 2419900
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Inheritance of CSS Basic User Interface properties</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-ui/#property-index"> | ||
<meta name="assert" content="Properties inherit or not according to the spec."> | ||
<meta name="assert" content="Properties have initial values according to the spec."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/inheritance-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="reference"></div> | ||
<div id="container"> | ||
<div id="target"></div> | ||
</div> | ||
<style> | ||
#reference { | ||
border-style: dotted; /* Avoid border-top-width computed style 0 */ | ||
border-top-width: medium; | ||
} | ||
|
||
#container, #target { | ||
outline-style: dotted; /* Avoid outline-width computed style 0 */ | ||
} | ||
</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-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-offset', '0px', '10px'); | ||
assert_not_inherited('outline-style', 'none', 'auto'); | ||
assert_not_inherited('outline-width', mediumWidth, '10px'); | ||
assert_not_inherited('resize', 'none', 'vertical'); | ||
assert_not_inherited('user-select', 'auto', 'none'); | ||
</script> | ||
</body> | ||
</html> |