Skip to content

Commit

Permalink
Fix the border mismatch in code blocks
Browse files Browse the repository at this point in the history
Fixes #100 -- the border now lines up with the bounds of the code block
and placing code blocks in table cells does not allow the table to grow
wider than the viewport. Overflowing text will be hidden in this case.
  • Loading branch information
vixus0 committed Sep 5, 2019
1 parent 00b011f commit ffa2261
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/assets/stylesheets/modules/_technical-documentation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@

table {
@include govuk-responsive-margin(6, "bottom");
table-layout: fixed;
}

pre + h2 {
Expand Down Expand Up @@ -119,11 +120,6 @@
overflow: auto;
position: relative;
border: 1px solid $code-02;
// Restrict the width of pre tags, as they have a tendency grow larger than
// the viewport when placed within table cells.
// @todo: Use table-layout: fixed, and remove the max-width definition from
// .technical-documentation so tables can fill the viewport.
max-width: 40em;
}

pre code {
Expand Down

0 comments on commit ffa2261

Please sign in to comment.