w3c / device-posture

Device Posture API
https://www.w3.org/TR/device-posture/
Other
33 stars 21 forks source link

what happens if there is no fold present? #21

Closed diekus-zz closed 4 years ago

diekus-zz commented 4 years ago

-default values? -other alternatives?

kenchris commented 4 years ago

matchMedia("(screen-fold-posture)") could return false in case there is no fold. (we could add example for that then)

kenchris commented 4 years ago

I am not a big fan of making the fold object undefined as that is usually how people detect if a browser supports a feature

kenchris commented 4 years ago

Maybe we should define a posture for a screen with no fold, like "no-fold" or "regular", then set "angle" to 0

diekus-zz commented 4 years ago

I like the idea of having a posture "no-fold" that sets an angle to 0. This would be the default for any traditional device. I'll add this in the spec. Worst case we can edit it out but I think it'd be consistent and I am not a fan of having the object be undefined. Seems like the lazy way of dealing with it.

Although if we think about it a device that's "not folded" is always in a 180 degree. 🤔

diekus-zz commented 4 years ago

added a default no-fold state