Skip to content

Commit

Permalink
Make sure that rich-text has spacing and margin. DDFFORM-5
Browse files Browse the repository at this point in the history
It worked in Storybook, but not in Drupal.
That is because Storybook adds its own wrapper, which made it appear
correct.
  • Loading branch information
rasben committed Dec 15, 2023
1 parent 13c6838 commit f21fa19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stories/Library/rich-text/rich-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

// Setting a max-width to increase readability for sentences.
max-width: $layout__max-width--text;
margin: auto;
padding-left: $layout__page-padding;
padding-right: $layout__page-padding;

a {
@extend %text-inline-link;
Expand Down
4 changes: 4 additions & 0 deletions src/styles/scss/tools/variables.layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ $layout__max-width--small: 768px;
$layout__max-width--large: 1440px;

$layout__max-width--text: 780px;

// Some elements should not go out to the edge of the screen on small screens.
// This is the padding that is always shown on the left and right.
$layout__page-padding: $s-xl;

0 comments on commit f21fa19

Please sign in to comment.