mdc-layout-grid show cells with display=block
See original GitHub issueUsing the last version of the MDC components by:
<link rel="stylesheet" href="node_modules/material-components-web/dist/material-components-web.css">
I get a grid with cells aligned vertically and not horizontally (inline). Last week it was working. I was probably using version 0.12. I just saw there is a new version: 0.13 and that’s probably the mistake.
<!DOCTYPE html>
<html class="mdc-typography">
<head>
<meta charset="utf-8"/>
<!-- roboto font -->
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<!-- mdc -->
<link rel="stylesheet" href="node_modules/material-components-web/dist/material-components-web.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body class="mdc-typography">
<div class="mdc-layout-grid">
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-4">1</div>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-4">2</div>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-4">3</div>
</div><!-- .mdc-layout-grid -->
<script src="node_modules/material-components-web/dist/material-components-web.js"></script>
<script>mdc.autoInit()</script>
</body>
I have tested it in Chrome (58) and Firefox and I get the same result.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Developers - mdc-layout-grid show cells with display=block -
I get a grid with cells aligned vertically and not horizontally (inline). Last week it was working. I was probably using version 0.12....
Read more >Layout Grid - Material Design
Layout Grid. Material design's responsive UI is based on a column-variate grid layout. It has 12 columns on desktop, 8 columns on tablet...
Read more >How to align li to the center with the dot - Stack Overflow
You can wrap the ul with a div and try the following code. <style> .box{ display: flex; } .box ul{ margin: auto; text-align:...
Read more >@material/layout-grid - npm
MDC Layout Grid is a CSS-only component that implements the Material ... Every cell should have the mdc-layout-grid__cell class and must be ...
Read more >How to insert and customize skins and icon packs - TinyMCE
... .dcs main { display: block; } .dcs { margin: 0; font-family: ... <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6" ...
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
Ah, ok. I see the problem here 😃 So even the following simple not nested grid has to have the
__inner
classIf yes we are done here. But since this is migration issue the docs should point that out a bit more explicitly. Also the examples (which TBH are more self-explaining in some cases than docs) should be updated.
Anyway thank you very much @sivaraam
That’s where you got it wrong.
mdc-layout-grid__inner
was introduced to make the grid nestable. Read the README in the directory with care. The relevant portion is (emphasis added),See #496 for more info