mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
LibWeb: Add missing MEDIAQUERIES-5 media-features
This adds (or at least stubs-out) the following: - display-mode - dynamic-range - environment-blending - forced-colors - horizontal-viewport-segments - vertical-viewport-segments - inverted-colors - nav-controls - prefers-contrast - prefers-reduced-data - prefers-reduced-motion - prefers-reduced-transparency - scripting - video-color-gamut - video-dynamic-range The `@media (inverted-colors)` CSS that the spec requires we add to the UA style sheet does not actually do anything for us yet since we don't support `filter`, but it seemed sensible to include it now to avoid forgetting later. :^)
This commit is contained in:
parent
84a06a1209
commit
aa48dda3a4
3 changed files with 166 additions and 11 deletions
|
@ -306,3 +306,13 @@ mark {
|
|||
* https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules
|
||||
*/
|
||||
iframe { border: 2px inset; }
|
||||
|
||||
/* https://www.w3.org/TR/mediaqueries-5/#descdef-media-inverted-colors
|
||||
*/
|
||||
@media (inverted-colors) {
|
||||
img:not(picture>img),
|
||||
picture,
|
||||
video {
|
||||
filter: invert(100%);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,37 @@
|
|||
"<length>"
|
||||
]
|
||||
},
|
||||
"display-mode": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"fullscreen",
|
||||
"standalone",
|
||||
"minimal-ui",
|
||||
"browser"
|
||||
]
|
||||
},
|
||||
"dynamic-range": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"standard",
|
||||
"high"
|
||||
]
|
||||
},
|
||||
"environment-blending": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"opaque",
|
||||
"additive",
|
||||
"subtractive"
|
||||
]
|
||||
},
|
||||
"forced-colors": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"none",
|
||||
"active"
|
||||
]
|
||||
},
|
||||
"grid": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
|
@ -70,6 +101,12 @@
|
|||
"<length>"
|
||||
]
|
||||
},
|
||||
"horizontal-viewport-segments": {
|
||||
"type": "range",
|
||||
"values": [
|
||||
"<integer>"
|
||||
]
|
||||
},
|
||||
"hover": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
|
@ -77,12 +114,26 @@
|
|||
"hover"
|
||||
]
|
||||
},
|
||||
"inverted-colors": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"none",
|
||||
"inverted"
|
||||
]
|
||||
},
|
||||
"monochrome": {
|
||||
"type": "range",
|
||||
"values": [
|
||||
"<integer>"
|
||||
]
|
||||
},
|
||||
"nav-controls": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"none",
|
||||
"back"
|
||||
]
|
||||
},
|
||||
"orientation": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
|
@ -120,6 +171,36 @@
|
|||
"dark"
|
||||
]
|
||||
},
|
||||
"prefers-contrast": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"no-preference",
|
||||
"less",
|
||||
"more",
|
||||
"custom"
|
||||
]
|
||||
},
|
||||
"prefers-reduced-data": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"no-preference",
|
||||
"reduce"
|
||||
]
|
||||
},
|
||||
"prefers-reduced-motion": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"no-preference",
|
||||
"reduce"
|
||||
]
|
||||
},
|
||||
"prefers-reduced-transparency": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"no-preference",
|
||||
"reduce"
|
||||
]
|
||||
},
|
||||
"resolution": {
|
||||
"type": "range",
|
||||
"values": [
|
||||
|
@ -134,6 +215,14 @@
|
|||
"progressive"
|
||||
]
|
||||
},
|
||||
"scripting": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"none",
|
||||
"initial-only",
|
||||
"enabled"
|
||||
]
|
||||
},
|
||||
"update": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
|
@ -142,6 +231,27 @@
|
|||
"fast"
|
||||
]
|
||||
},
|
||||
"vertical-viewport-segments": {
|
||||
"type": "range",
|
||||
"values": [
|
||||
"<integer>"
|
||||
]
|
||||
},
|
||||
"video-color-gamut": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"srgb",
|
||||
"p3",
|
||||
"rec2020"
|
||||
]
|
||||
},
|
||||
"video-dynamic-range": {
|
||||
"type": "discrete",
|
||||
"values": [
|
||||
"standard",
|
||||
"high"
|
||||
]
|
||||
},
|
||||
"width": {
|
||||
"type": "range",
|
||||
"values": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue