Skip to content
Snippets Groups Projects
Unverified Commit 802dae92 authored by Fredrik Jonsson's avatar Fredrik Jonsson Committed by GitHub
Browse files

Merge pull request #1600 from OpenTechFund/fix/tables-long-lines-fit-layout

Make big tables and long links etc fit within the layout
parents 15eb4e79 88191b8c
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,14 @@
'use strict';
$('p').each(function () {
$('.rich-text--answers').find('p').each(function () {
// Detach (remove) p tag with only whitespace inside.
if ($.trim($(this).text()) === '') {
$(this).detach();
}
});
// Wrap all tables in a div so overflow auto works.
$('.rich-text--answers').find('table').wrap('<div class="rich-text__table"></div>');
})(jQuery);
......@@ -95,6 +95,9 @@ $site-width: 1280px;
$wrapper--medium: 1020px;
$wrapper--small: 790px;
// Text line length
$max-text-line-length: 50em;
// Breakpoints
$breakpoints: (
'mob-portrait' '(min-width: 320px)',
......
......@@ -142,6 +142,11 @@
}
}
&__comment {
word-break: break-word;
max-width: $max-text-line-length;
}
&__related-item {
svg {
width: 10px;
......
.rich-text {
margin-bottom: 2rem;
word-break: break-word;
max-width: $max-text-line-length;
&--answers {
> section {
......@@ -46,6 +47,10 @@
}
}
&__table {
overflow: auto;
}
a {
font-weight: $weight--bold;
border-bottom: 1px solid transparent;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment