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.

Details

Related Gerrit Patches:
mediawiki/extensions/TemplateStyles : masterUse wikimedia/css-sanitizer, and rewrite the hooking

Related Objects

StatusAssignedTask
OpenNone
OpenNone
ResolvedNone
DuplicateNone
OpenNone
OpenNone
OpenNone
DuplicateNone
OpenNone
OpenNone
ResolvedJdlrobson
DuplicateNone
DuplicateNone
OpenNone
OpenNone
DeclinedNone
InvalidNone
OpenNone
OpenNone
ResolvedTheDJ
ResolvedTheDJ
InvalidNone
OpenNone
ResolvedTheDJ
OpenNone
ResolvedJdlrobson
OpenJdlrobson
OpenJdlrobson
ResolvedTgr
ResolvedAnomie
StalledMhurd

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 19 2016, 11:41 PM
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)
Tgr added a subscriber: Tgr.EditedDec 13 2016, 1:14 AM

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 closed this task as Resolved.Jun 7 2017, 4:13 PM
Anomie claimed this task.
ggellerman moved this task from Up next to Done on the TemplateStyles board.Nov 21 2017, 7:16 PM