Merge pull request #1129 from ragibson/fix-wide-elements-breaking-layout

Fix wide elements (equations, tables, and inline code) breaking site width and layout
This commit is contained in:
Nuno Coração
2024-01-04 20:59:46 +00:00
committed by GitHub
2 changed files with 37 additions and 0 deletions

View File

@@ -4590,6 +4590,28 @@ body:has(#menu-controller:checked) {
opacity: 0.05;
}
/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */
.katex-display {
overflow: auto hidden
}
/* Fix long tables breaking out of article on mobile */
table {
display: block;
overflow: auto;
}
/* Fix long inline code sections breaking out of article on mobile */
code {
word-wrap: break-word;
/* All browsers since IE 5.5+ */
overflow-wrap: break-word;
/* Renamed property in CSS3 draft spec */
}
/* -- Chroma Highlight -- */
/* Background */

View File

@@ -111,6 +111,21 @@ body:has(#menu-controller:checked) {
@apply absolute opacity-5 -z-10;
}
/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */
.katex-display { overflow: auto hidden }
/* Fix long tables breaking out of article on mobile */
table {
display: block;
overflow: auto;
}
/* Fix long inline code sections breaking out of article on mobile */
code {
word-wrap: break-word; /* All browsers since IE 5.5+ */
overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */
}
/* -- Chroma Highlight -- */
/* Background */
.prose .chroma {