Share via


-ms-view-state media feature

This feature is deprecated as of Internet Explorer 11 and Windows 8.1 and should no longer be used. Use max-width and min-width instead.

Describes the view-state of the Windows Store app using JavaScript.

Possible values

  • Value:fullscreen-landscape | filled | snapped | fullscreen-portrait
  • Applies to: bitmap media types
  • Accepts min/max prefixes: no

One of the following values.

Value Description

fullscreen-landscape

Indicates the device is in landscape orientation and the app's client area is the same height and width as the device's height and width. That is, the app takes up the full screen.

filled

Indicates the device is in landscape orientation, the application's height and width is less than the device's height and width, and the application is not in the snapped state. That is, the current app's view has been reduced to a partial screen view because another app is in the snapped state.

snapped

Indicates the device is in landscape orientation, the application's height and width is less than the device's height and width, and the application is in the snapped state.

fullscreen-portrait

Indicates the device is in portrait orientation and the application's height and width is equal to the device's height and width. That is, the app takes up the full screen.

 

Remarks

The -ms-view-state media feature is new in Windows 8, and can only be used in Windows Store apps using JavaScript.

Examples

The following example shows each of the -ms-view-state values in use. All of them included in the default templates for Windows Store apps using JavaScript.

@media screen and (-ms-view-state: fullscreen-landscape) {
  ...
}
@media screen and (-ms-view-state: filled) {
  ...
}
@media screen and (-ms-view-state: snapped) {
  ...
}
@media screen and (-ms-view-state: fullscreen-portrait) {
  ...
}