Skip to content

Commit a95ed62

Browse files
committed
Correctly include poem class on poem layout
BackstopJS is already paying off big time here, because without it I might not have caught this little subtle issue. While the `poem.html` layout used `poetry` as its container class, the CSS referenced a `poem` class (which fits with narrative and drama using their same file names as the container class). However, because `div.poem` did not exist, the margin set on the bottom of poems was never applied. That is now fixed, which is why the reference images are updated with this commit. (That said, the margins are collapsing in a way the original author of the CSS likely did not intend, but that's a fix for another day.) To preserve backward-compatibility, I have added the `poem` class to the existing `poetry` class in the poem template. I have also updated the CSS to account for the use of either `poem` or `poetry` as the container class names.
1 parent ca208bf commit a95ed62

12 files changed

+4
-1
lines changed

_layouts/poem.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: default
33
---
44

5-
<article class="poetry">
5+
<article class="poem poetry">
66
<h1 class="text-title">{{ page.title }}</h1>
77
<p class="byline">{{ page.author }}</p>
88
{{ content }}

_sass/_ed.scss

+3
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ p.small {
664664
}
665665

666666
div.poem,
667+
.poem,
667668
div.narrative,
668669
.narrative {
669670
margin-bottom: 5rem;
@@ -681,6 +682,7 @@ div.toc {
681682
want you want to remove the hanging indent, reset the padding-left to 0 and erase text-indent
682683
*/
683684

685+
.poem ul,
684686
.poetry ul,
685687
ul.poetry {
686688
list-style: none;
@@ -751,6 +753,7 @@ ul.poetry {
751753
padding-left: 10rem;
752754
}
753755

756+
.poem .byline,
754757
.poetry .byline {
755758
font-style: italic;
756759
font-weight: 300;
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)