grid layout keeps 8 columns under mdc-layout-grid__cell--span-4-phone rule
See original GitHub issueWhat MDC Web Version are you using?
My angular 7.2.2 project is using:
"@material/layout-grid": "^0.41.0"
What browser(s) is this bug affecting?
Chrome 72, Firefox 62
What OS are you using?
Windows 10
What are the steps to reproduce the bug?
<div class="mdc-layout-grid">
<div class="mdc-layout-grid__inner">
<div class="mdc-layout-grid__cell--span-4-phone
mdc-layout-grid__cell--span-8-tablet
mdc-layout-grid__cell--span-12-desktop">
<router-outlet></router-outlet>
</div>
</div>
</div>
According to responsive layout documentation (https://material.io/design/layout/responsive-layout-grid.html#breakpoints), the browser under 599px activates xsmall breakpoint so it should be only 4 columns. However we got 8 columns yet.
What is the expected behavior?
Should be only 4 columns under 599px since we specify mdc-layout-grid__cell-span-4-phone.
What is the actual behavior?
The snippet above only goes to 4 columns when the browser width is under 479px. We have tested the material breakpoint itself. The breakpoint xsmall is working fine, but mdc-layout-grid is not respecting the rule of 4 columns for xsmall starting at 599px, it just work under 479px.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Basic concepts of grid layout - CSS: Cascading Style Sheets
What is a grid? A grid is a set of intersecting horizontal and vertical lines defining columns and rows. Elements can be placed...
Read more >Grid - Lightning Design System
You can have up to 12 columns in your grid. 1. 2. 3. 4. 5. 6. 7. 8 ... This will keep your...
Read more >CSS grid-column property - W3Schools
The grid-column property specifies a grid item's size and location in a grid layout, and is a shorthand property for the following properties:....
Read more >2x Grid - IBM Design Language
Dividing your space into 2, 4, 8, 16, 32, or 64 columns gives you the basis ... When constructing the grid, keep in...
Read more >Grid Cheatsheet
The table in CSS 2.1 Chapter 9.7 is thus amended to contain an additional row, ... Any rows/columns defined by grid-template-areas but not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just ran into this as well. I ran a few searches on this repository, and it looks like layout grid and snackbar are the only ones that still use 480px as the phone/tablet breakpoint. It should be a pretty quick PR to get those fixed.
Thanks for filing this issue! 😀
It looks like our breakpoints haven’t been updated with the latest values from the Guidelines:
599px
479px
We should ensure that breakpoint values are consistent across all of our components.