forked from mirrors/gecko-dev
Automatic update from web-platform-tests Tests for ::placeholder and ::file-selector-button inheritance Both of those elements are tree-abiding pseudo elements which should inherit from their originating elements per spec. Bug: 922869 Change-Id: Ia00a9a421895e6fcd48b7403da97360dae73f91e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3268596 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#940495} -- wpt-commits: f9d614349dbb0ce3ab5180f6fcfe24f727b34dac wpt-pr: 31579
20 lines
857 B
HTML
20 lines
857 B
HTML
<!doctype html>
|
|
<title>CSS Pseudo Test: ::file-selector-button inherits from its originating element</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#treelike">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<style>
|
|
input { background-color: green; }
|
|
input::file-selector-button {
|
|
color: green;
|
|
background-color: inherit;
|
|
}
|
|
</style>
|
|
<input id="inp" type="file">
|
|
<script>
|
|
test(() => {
|
|
const style = getComputedStyle(inp, "::file-selector-button");
|
|
assert_equals(style.color, "rgb(0, 128, 0)", "Check that ::file-selector-button is supported via color");
|
|
assert_equals(style.backgroundColor, "rgb(0, 128, 0)", "::file-selector-button inheriting background-color");
|
|
}, "::file-selector-button should inherit from its originating element");
|
|
</script>
|