Skip to content

Commit

Permalink
Merge pull request #42 from texastribune/story-body-updates
Browse files Browse the repository at this point in the history
Account for hr in story body
  • Loading branch information
ashley-hebler committed Jul 19, 2019
2 parents 9461f57 + 1c4074b commit 958aa56
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions assets/scss/6-components/story-body/_story-body.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $story-narrow-bp: ($story-narrow / 1rem) + $story-padding-buffer;
> h6,
> ul,
> span,
> hr,
> div:not([class^="plugin"]) {
max-width: $story-narrow;
margin: $size-b auto;
Expand All @@ -42,4 +43,7 @@ $story-narrow-bp: ($story-narrow / 1rem) + $story-padding-buffer;
position: initial;
}

hr {
margin: $size-xl auto;
}
}
9 changes: 8 additions & 1 deletion assets/scss/6-components/story-body/story-body.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@ <h3>Helper classes needed</h3>
<li>t-serif</li>
<li>t-space-heading-m</li>
</ul>
<h3>Horizontal Rules</h3>
<p>Use a horizontal rule to break up content. A horizontal rule is displayed below.</p>
<hr/>
<p>The hr tag has built in top and bottom margin. We do this because it's normally used as a spacing element and the need for cushion is assumed.</p>
<h3>Headings</h3>
<p>Our editor has a dropdown option called <em>Subheader</em> for adding a heading element. By default, that tag is an h3. In the event someone were to open the source and add others, this is how they would display.</p>
<h2>Heading 2</h2>
<h3>Heading 3 - Default</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<div class="has-padding has-bg-yellow">Example of rouge div</div>
<h3>Plugins</h3>
<p>Plugins are special and have their own rules for positioning. A div without the plugin class will still align with the story text, but any div prefixed with "plugin" will be excluded from the max-width and margin declaration the other elements adhere to.</p>
<div class="has-padding has-bg-yellow">Example of rouge div without the plugin class.</div>
<div class="plugin has-padding has-bg-gray-light">Example of plugin. Should be not be bound by container.</div>
<div class="plugin-ad has-padding has-bg-gray-light">Example of ad plugin. Should be not be bound by container</div>
</section>

0 comments on commit 958aa56

Please sign in to comment.