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

[docs] Update breakpoints.md for clarity #14527

Merged
merged 2 commits into from
Feb 16, 2019
Merged

[docs] Update breakpoints.md for clarity #14527

merged 2 commits into from
Feb 16, 2019

Conversation

matthewjwhitney
Copy link
Contributor

@matthewjwhitney matthewjwhitney commented Feb 14, 2019

As proposed in the discussion from issue #13448 [Breakpoints] functions down() and between() adds +1 to index, the breakpoint widths are described as a range. Furthermore, I found some broken hash links that I attempted to fix.

Closes #13448

- **md**, medium: 960px or larger
- **lg**, large: 1280px or larger
- **xl**, extra-large: 1920px or larger
* **xs,** extra-small: 0px to 600px
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, I think that we should use - for marking a list item.

@@ -179,7 +179,7 @@ const styles = theme => ({
});
```

### `theme.breakpoints.between(start, end) => media query`
<a id="theme-breakpoints-between-start-end-media-query">### `theme.breakpoints.between(start, end) => media query`</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with the current hash generation logic?

* **xs,** extra-small: 0px to 600px
* **sm,** small: 600px to 960px
* **md,** medium: 960px to 1280px
* **lg,** large: 1280px to 1920px
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not 💯 accurate. The actual value is 1920px - 0.05px, as the intervals have an empty intersection. It's important. But 0.05px is too low-level information. I think that it's it important for people to understand that a breakpoint has an associated range, inclusive. It's better explained in
https://material-ui.com/layout/hidden/#how-it-works. I'm not sure how we can explain it here.

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Feb 14, 2019
@oliviertassinari oliviertassinari changed the title Update breakpoints.md for clarity [docs] Update breakpoints.md for clarity Feb 14, 2019
matthewjwhitney and others added 2 commits February 15, 2019 12:09
As proposed in the discussion from issue #13448 [Breakpoints] functions down() and between() adds +1 to index, the breakpoint widths are described as a range. Furthermore, I found some broken hash links that I attempted to fix.
@oliviertassinari oliviertassinari changed the base branch from master to next February 15, 2019 11:31
@oliviertassinari oliviertassinari merged commit 349cf1f into mui:next Feb 16, 2019
@oliviertassinari
Copy link
Member

@matthewjwhitney Thanks, I'm moving forward, I'm happy to take your feedback anytime you can :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Breakpoints] functions down() and between() adds +1 to index
2 participants