ladybird
ladybird copied to clipboard
LibWeb: Styles inside `@media` are ignored if there is no query
I'm not sure if @media without actual query is valid but Chrome and Firefox seem to apply styles anyway. This reduction also comes from a real website iirc, so things like that exist in the wild.
Example:
<style>
@media {
body {
background-color: crimson;
}
}
</style>
| Chrome/Firefox | Ladybird |
|---|---|
|
|
|
Thanks! Spec says that it is indeed valid, so this is a bug in our implementation:
An empty media query list evaluates to true. For example, these are equivalent:
@media all { … }@media { … }https://www.w3.org/TR/mediaqueries-5/#mq-list