Re: [csswg-drafts] [css-nav-1] How author know spatnav will work by default in specific user agent? (#3385)

---

Migrated from https://github.com/WICG/spatial-navigation/issues/41#issuecomment-377135129
Originally created by @frivoal on *Thu, 29 Mar 2018 06:26:36 GMT*

---
> How about making this variable as combination type such as ("sequential, spatial" | "spatial"), or {sequential, spatial}?

I don't understand. This would be a media feature, not a variable, so you could write:
```
@media (navigation: spatial) { ... }
@media (navigation: sequential) { ... }
@media (navigation) { /*matches if either is true*/ }
@media (navigation: none ) { /*matches if both are false*/ }
@media not (navigation) { /*same as above*/ }
```
Given how media queries work, the first two could absolutely match on the same device, if that device supports both sequential and spatial.

> I also imagine an extended navigation, let's say that 3d navigation

Sure, no problem, then we can just add the new value, and you can continue to write the same as above, and also `@media (navigation: nav3d) { ... }`, and then `@media (navigation) { ... }` matches if any type of navigation, including 3d, is available.



-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3385#issuecomment-443619108 using your GitHub account

Received on Monday, 3 December 2018 07:53:12 UTC