WordPress.org

Make WordPress Core

Opened 21 months ago

Last modified 20 months ago

#43197 new defect (bug)

Nesting @media rule inside @supports rule fails CSS validation

Reported by: neoqueto Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.2
Component: Customize Keywords:
Focuses: ui, administration, coding-standards Cc:
PR Number:

Description

The CSS editor in the Customize panel returns 2 syntax errors when trying to insert a @media rule inside a @supports rule. It does work fine the other way around.

See screenshot:
https://i.imgur.com/81b01Bp.png

Results are independent of specified properties & values.

This might impact performance, because it is faster to skip the entire content of a feature query if a browser does not support a certain feature, rather than having multiple media queries with @supports in each of them. Besides, it can be functionally different, as explained here: https://stackoverflow.com/a/42438244

Tested on Chrome 63 and Windows 7.

Change History (2)

#1 @westonruter
20 months ago

See also #42528. It's probably a bug with CSSLint.

#2 @westonruter
20 months ago

Or rather, see #43105.

Note: See TracTickets for help on using tickets.