Page MenuHomePhabricator

No skin used for Opera fullscreen (uses CSS 'projection' media type instead of 'screen')
Closed, ResolvedPublic

Description

Due to this change: http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=38116

Opera in fullscreen mode, does not use CSS at the moment. In Fullscreen mode, opera uses the "projection" media type, but it is not provided anymore. Since there is no "all" media types stylesheet, no styling is used.

This raises an interesting issue btw. We also have 0 CSS for aural, braille and other modes.


Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#CSS_screen_media_type_in_Opera.27s_fullscreen

Details

Reference
bz18497

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:32 PM
bzimport set Reference to bz18497.

lucideer wrote:

Just FYI -
To say "no styling is used" is not 100% accurate. The code is roughly as follows (slightly reformatted for readability):

<link rel="stylesheet" href="/skins-1.5/common/shared.css?207xx" type="text/css" media="screen" />
<link rel="stylesheet" href="/skins-1.5/common/commonPrint.css?207xx" type="text/css" media="print" />
<link rel="stylesheet" href="/skins-1.5/monobook/main.css?207xx" type="text/css" media="screen" />
<link rel="stylesheet" href="/skins-1.5/chick/main.css?207xx" type="text/css" media="handheld" />
<link rel="stylesheet" href="/w/index.php?title=MediaWiki:Common.css<snip>" type="text/css" />
<link rel="stylesheet" href="/w/index.php?title=MediaWiki:Print.css<snip>" type="text/css" media="print" />
<link rel="stylesheet" href="/w/index.php?title=MediaWiki:Handheld.css<snip>" type="text/css" media="handheld" />
<link rel="stylesheet" href="/w/index.php?title=MediaWiki:Monobook.css<snip>" type="text/css" />
<link rel="stylesheet" href="/w/index.php?title=-<snip>" type="text/css" />
<link rel="stylesheet" href="/w/index.php?title=User:Lucideer/monobook.cs<snip>" type="text/css" />

So there are at least 4 separate stylesheets being applied to all media types including those that are not screen/print/handheld. Looking at the site in presentation mode, I actually think the formatting is not terribly bad, the only thing missing is the left hand sidebar, and the "Edit, Discuss, History, Watch" tabs (all of those links are listed linearly at the base of the page).

My point is that, *some* styles are at least being fed to *all* media types, so doing simply media="screen,projection" on shared.css and main.css would not necessarily leave aural, tty, etc. completely "style-less" so to speak.

happy.melon.wiki wrote:

I'm rather inclined to feel that this is Opera's problem (or perhaps even Opera *users'* problem) rather than ours. Semantically the CSS declarations are clear: "presentation" is *supposed* to be for things like projections, big-screen displays, etc; in those situations we should perhaps be looking at hiding things like the sidebar links altogether, or at least minimising them. Opera has a defensible argument to say that that's what its fullscreen mode should be used for, and users should be using the normal mode for normal browsing. Fundamentally, the problem is that some users are using a display intended for 'big-screen' presentations, for non-big-screen browsing. I'm not sure to what extent we *should* be accomodating that. It's certainly true that our CSS for more exotic media types badly needs some attention, but I'm not sure that this is really a regression.

I dropped out the 'projection' because it saved a few bytes to remove what seemed useless and incorrect... no browser that I knew of used it, and per spec it has very specific semantic differences from 'screen' -- it's meant to be a paged type (like printing) rather than allowing continuous scrolling, and implies other structural differences -- so it's really not something I'd have expected to ever come up in a real-world context.

While it looks semantically incorrect for Opera to be using 'projection' instead of 'screen' when in full-screen zoom, there's probably no point to breaking it. :)

Should be easy enough to transform 'screen' back to 'screen, projection' here.

Got reminded of this; confirmed w/ David Storey @ Opera that it's using 'projection'. I think we disagree on the reading of the spec ;) but there's not much downside to tossing the 'projection' back in for Opera compat.

Trevor, can you take a peek at this and fix it up so we're specifying 'screen,projection' consistently for all skins? This should probably be done in the output transform so internally we can just specify 'screen'.

This has been solved in r54109 by adding the projection media to any style with screen media.

ayg wrote:

(In reply to comment #4)

Got reminded of this; confirmed w/ David Storey @ Opera that it's using
'projection'. I think we disagree on the reading of the spec ;)

That doesn't make any sense. What did he say? If they really think this, I'll bring it up on www-style.

ayg wrote:

I brought it up on www-style after getting no response from David Storey for a week or so:

http://lists.w3.org/Archives/Public/www-style/2009Aug/0338.html

It turns out that Opera does interpret screen stylesheets in full-screen mode, but *only* if there are no projection stylesheets. This is like their small-screen mode: they try to use media-specific stylesheets if provided, otherwise they try to intelligently adapt the screen stylesheets to the medium (which doesn't involve changing much of anything, for projection). Obviously they can't really tell if they're *actually* hooked up to a projector, and if they could, they wouldn't want to, since that would mess up testing your presentation at home and so on.

So in other words, we can drop projection as long as we drop it *everywhere*. I'll see if I can do that.

ayg wrote:

(In reply to comment #7)

So in other words, we can drop projection as long as we drop it *everywhere*.
I'll see if I can do that.

Done in r55274. Reopen if there are any problems.