question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

grid layout keeps 8 columns under mdc-layout-grid__cell--span-4-phone rule

See original GitHub issue

What 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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dawsonc623commented, Mar 13, 2019

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.

1reaction
acdvorakcommented, Feb 21, 2019

Thanks for filing this issue! 😀

It looks like our breakpoints haven’t been updated with the latest values from the Guidelines:

  • Guidelines: 599px
  • MDC Web: 479px

We should ensure that breakpoint values are consistent across all of our components.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found