LibWeb/CSS: Set the initial value of the appearance property to "none"

This commit is contained in:
Tim Ledbetter 2025-03-22 01:32:36 +00:00 committed by Alexander Kalenik
parent ecd6636b3e
commit cbf47abd24
Notes: github-actions[bot] 2025-03-22 16:06:09 +00:00
5 changed files with 43 additions and 6 deletions

View file

@ -275,7 +275,7 @@
"appearance": {
"animation-type": "discrete",
"inherited": false,
"initial": "auto",
"initial": "none",
"valid-types": [
"appearance"
]

View file

@ -36,9 +36,9 @@ All supported properties and their default values exposed from CSSStylePropertie
'WebkitAnimationTimingFunction': 'ease'
'webkitAnimationTimingFunction': 'ease'
'-webkit-animation-timing-function': 'ease'
'WebkitAppearance': 'auto'
'webkitAppearance': 'auto'
'-webkit-appearance': 'auto'
'WebkitAppearance': 'none'
'webkitAppearance': 'none'
'-webkit-appearance': 'none'
'WebkitBackgroundClip': 'border-box'
'webkitBackgroundClip': 'border-box'
'-webkit-background-clip': 'border-box'
@ -154,7 +154,7 @@ All supported properties and their default values exposed from CSSStylePropertie
'animation-play-state': 'running'
'animationTimingFunction': 'ease'
'animation-timing-function': 'ease'
'appearance': 'auto'
'appearance': 'none'
'aspectRatio': 'auto'
'aspect-ratio': 'auto'
'backdropFilter': 'none'

View file

@ -71,7 +71,7 @@ animation-iteration-count: 1
animation-name: none
animation-play-state: running
animation-timing-function: ease
appearance: auto
appearance: none
aspect-ratio: auto
backdrop-filter: none
background-attachment: scroll

View file

@ -0,0 +1,9 @@
Harness status: OK
Found 4 tests
4 Pass
Pass support for appearance
Pass initial value for appearance
Pass support for -webkit-appearance
Pass initial value for -webkit-appearance

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Basic User Interface Test: appearance and -webkit-appearance</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching">
<meta name="assert" content="The appearance and -webkit-appearance properties are supported.">
<meta name="assert" content="Initial value is none.">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style>
#appearance { appearance: button; }
#-webkit-appearance { -webkit-appearance: button; }
</style>
<div id="appearance"></div>
<div id="-webkit-appearance"></div>
<div id="initial"></div>
<script>
for (const prop of ['appearance', '-webkit-appearance']) {
test(() => {
const actual = getComputedStyle(document.getElementById(prop)).getPropertyValue(prop);
assert_equals(actual, 'button');
}, `support for ${prop}`);
test(() => {
const actual = getComputedStyle(document.getElementById('initial')).getPropertyValue(prop);
assert_equals(actual, 'none');
}, `initial value for ${prop}`);
}
</script>