Page MenuHomePhabricator

TemplateStyles should support media queries
Closed, ResolvedPublic

Description

My media queries seem to be ignored in http://ts.wmflabs.org/w/index.php/Template:TwoColumnLayout

They are added as global styles rather than @media wrapped styles.
See: http://ts.wmflabs.org/w/index.php/Two_col_layout

Expected: at < 768px the styles do not apply.

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
ResolvedJdlrobson
DeclinedNone
DuplicateNone
ResolvedJdlrobson
DuplicateNone
DuplicateNone
DeclinedNone
ResolvedJdlrobson
DuplicateNone
DuplicateNone
ResolvedNone
OpenNone
ResolvedTheDJ
DeclinedNone
InvalidNone
OpenFeatureNone
InvalidNone
ResolvedTheDJ
ResolvedTheDJ
InvalidNone
ResolvedIzno
ResolvedTheDJ
OpenNone
ResolvedJdlrobson
OpenNone
DeclinedNone
ResolvedTgr
ResolvedAnomie
DeclinedBUG REPORTNone

Event Timeline

Jdlrobson added a subscriber: coren.

@coren was this intentional or is this an oversight? Anything for me to worry about if I submit a patch?

@coren: Could you answer the last question please? ^^

jhobs renamed this task from Doesn't have proper media query support to TemplateStyles should support media queries.Oct 20 2016, 7:38 PM
jhobs updated the task description. (Show Details)

Very simple styles such as @media print do work. @media rules where the component value starts with a ( end up being misinterpreted as rules which can only be followed by a one level deep block. Pretty sure that's not intentional.

Change 346808 had a related patch set uploaded (by Anomie):
[mediawiki/extensions/TemplateStyles@master] Use wikimedia/css-sanitizer, and rewrite the hooking

https://gerrit.wikimedia.org/r/346808

Change 346808 merged by jenkins-bot:
[mediawiki/extensions/TemplateStyles@master] Use wikimedia/css-sanitizer, and rewrite the hooking

https://gerrit.wikimedia.org/r/346808

Anomie claimed this task.