Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better breakpoints #11

Open
Ayc0 opened this issue Sep 19, 2019 · 1 comment
Open

Better breakpoints #11

Ayc0 opened this issue Sep 19, 2019 · 1 comment

Comments

@Ayc0
Copy link
Collaborator

Ayc0 commented Sep 19, 2019

instead of just using the width (which is bad because it's easy to confuse a landscape phone and a portrait tablet, do something like:

const breakpoints = {
  // either width between 0-500 px and height between 0-800 px, or the opposite
  mobile: [[0, 500, 'px'], [0, 800, 'px']],
  // previous behavior
  tablet: [800, 1200, 'px']
};
@Ayc0
Copy link
Collaborator Author

Ayc0 commented Jun 24, 2021

What about better defaults?

/* smartphones, touchscreens */
@media (hover: none) and (pointer: coarse) {
    /* ... */
}
/* stylus-based screens */
@media (hover: none) and (pointer: fine) {
    /* ... */
}
/* Nintendo Wii controller, Microsoft Kinect */
@media (hover: hover) and (pointer: coarse) {
    /* ... */
}
/* mouse, touch pad */
@media (hover: hover) and (pointer: fine) {
    /* ... */
}

Edit: it doesn't work that great (see https://bugzilla.mozilla.org/show_bug.cgi?id=1556983) :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant