Skip to main content

Module spatial_nav

Module spatial_nav 

Source
Expand description

CSS Spatial Navigation Level 1 - the two per-container overrides.

9a-i-a made an arrow key try focus first and fall back to scrolling, which is the spec’s default behaviour and is right almost everywhere. These two properties are how a container opts OUT of that default, and neither is expressible any other way:

  • StyleSpatialNavigationAction forces the choice on a scroll container: always scroll (a map, a canvas, a code editor - places where an arrow means “pan”, never “jump to the next button”), or always move focus.
  • StyleSpatialNavigationContain makes an element a spatial navigation CONTAINER even when it is not a scroll container, so navigation inside a panel stays inside it.

Both are from css-nav-1, and both have auto as their initial value, so adding them changes nothing until a stylesheet asks.

Enums§

CssSpatialNavigationActionParseError
spatial-navigation-action parse error.
CssSpatialNavigationActionParseErrorOwned
Owned mirror of CssSpatialNavigationActionParseError.
CssSpatialNavigationContainParseError
spatial-navigation-contain parse error.
CssSpatialNavigationContainParseErrorOwned
Owned mirror of CssSpatialNavigationContainParseError.
StyleSpatialNavigationAction
spatial-navigation-action - what an arrow key does on a scroll container.
StyleSpatialNavigationContain
spatial-navigation-contain - whether this element is a spatial navigation container.

Functions§

parse_style_spatial_navigation_action
Errors
parse_style_spatial_navigation_contain
Errors