docs(layout): fix horizontal scrollbars on small screens

This patch addresses #1649 to fix documentation layout. It adds scroll behaviour to:

- Code snippets
- Component props table

This is a better fix than #1706 which was inspired by https://defensivecss.dev/tip/flexbox-min-content-size.
This commit is contained in:
Gregor Wassmann 2023-03-26 12:30:45 +02:00
commit 91e80164c8
2 changed files with 6 additions and 1 deletions

View file

@ -33,6 +33,11 @@ html[theme="g90"] .code-override {
overflow-x: auto;
}
/* Addig this to the layout grid fixes overstretching. */
.fix-overflow {
min-width: 0;
}
.token.tag,
.token.operator {
color: #6ea6ff;

View file

@ -66,7 +66,7 @@
</script>
<Content data-components>
<Grid>
<Grid class="fix-overflow">
<Row>
<Column>
<h1>{component}</h1>