sysapps / runtime

Runtime and Security Model for Hosted Web Applications and Packaged Applications
6 stars 13 forks source link

Clarify how screen_size fits together with CSS Device Adaptation @viewport #49

Closed kenchris closed 11 years ago

kenchris commented 11 years ago

Many games want to be fullscreen, and basically just scale the content to fit the screen while keeping the aspect ratio. These things should be possible to accomplish using media queries and CSS Device Adaptation, and it renders the screen_size less useful.

larsgk commented 11 years ago

+1

You could almost take the rules of fullscreen video and apply here.

Other things to consider:

If keeping aspect ratio - can the dead space then be used for something else? Maybe we need (then) to be able to tell an element to go fullscreen - but keep aspect ratio. It can then be aligned up/down or left/right depending on where the dead space is. Anyway, just a thought.

Also - it would be really cool if I could just specify, e.g. 320x240 - or 1920x1080 and go fullscreen to the best of the device's capabilities (a bit like viewport "width=1920, user-scaling=no" - just in both height and width).

You can always go for the one with flexible ratio by just specifying one of the two.

Game developers would be happy :)

mounirlamouri commented 11 years ago

I'm not sure I understand what the problem is here. I expect screen_size to be 800_600 if the screen has a resolution of 800_600. The fact that there might have some chrome making the content size lower shouldn't matter. Is that what you are asking for? Maybe it should be clarified?

anssiko commented 11 years ago

The spec currently says: "Those values are only hint for the UA and should not be considered as mandatory restrictions."

What is the main use case you had in mind for the screen_size? Something that is not addressed by @viewport already?

marcoscaceres commented 11 years ago

Unless I'm missing something, it looks like a hint for the store. I'm of the opinion that screen_size thing should be dropped as it leads to bad practice (assumes 1-to-1 pixel display) and will just confuse people. The size of the viewport should be set with <meta viewport> and content adapted to fit the available size.

marcoscaceres commented 11 years ago

Moved to: https://github.com/sysapps/manifest/issues/11