Page MenuHomePhabricator

Content styles should not be loaded in head
Closed, DeclinedPublic

Description

@Gilles the following styles are specific to the content but probably shouldn't be in the head
We could load these via JavaScript but then this would break the rendering for non-JS supported browsers.

I wonder if these would be better loaded in an inline style tag at the bottom outside ResourceLoader, given that they relate to page content? Thoughts?

.content table
.content table caption
.content table.wikitable
.content table.wikitable > tr > th,.content table.wikitable > tr > th,.content table.wikitable > * > tr > th,.content table.wikitable > * > tr > td
.client-js .alpha .infobox
.content .sistersitebox,.content .tmbox,.content .ambox,.content #coordinates,.content .navbox,.content .vertical-navbox,.content .topicon,.content .metadata
.content table
.content table.infobox
.content table.infobox th,.content table.infobox td
.content table.infobox tr:last-child th,.content table.infobox tr:last-child td

Event Timeline

Jdlrobson raised the priority of this task from to Medium.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: Florian, Jdlrobson, gerritbot and 3 others.

I think it's premature to make page content CSS loaded late, because they are likely to introduce visual jumpiness should these elements be above the fold at firstPaint.

As for inline anything, that's a bit of a nightmare for maintenance because pages are cached for 30 days. We should only resort to it for very specific, very stable code which would have to be kept to a minimum. CSS isn't that, as sooner or later it will see heavy redesign.

Jdlrobson claimed this task.