Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Add CSS overflow/wrapping on KaTeX, tables, and code sections #753

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions assets/css/compiled/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,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 */
Expand Down
15 changes: 15 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ body:has(#menu-controller:checked) {
@apply absolute -z-10 opacity-5;
}

/* 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 */
.chroma {
Expand Down
Loading