Skip to content

Commit

Permalink
Fix inconsistent content string behaviour.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ned Zimmerman committed Feb 24, 2018
1 parent 93cbc99 commit dcf850a
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions styles/components/structure/_content-strings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,30 @@ meta[name="pb-publisher-city"] {
string-set: chapter-number content();
}

.front-matter .front-matter-title-wrap > h1,
.chapter .chapter-title-wrap > h2,
.back-matter .back-matter-title-wrap > h1 {
.front-matter .front-matter-title-wrap .front-matter-title,
.chapter .chapter-title-wrap .chapter-title,
.back-matter .back-matter-title-wrap .back-matter-title {
string-set: section-title content();
}

// If the 'short-title' property is available, this will override the section
// title for use in the running head.

.front-matter > .short-title,
.chapter > .short-title,
.back-matter > .short-title {
.front-matter .front-matter-title-wrap .short-title,
.chapter .chapter-title-wrap .short-title,
.back-matter .back-matter-title-wrap .short-title {
width: 0;
height: 0;
visibility: hidden; // display: none causes issues with string-set
string-set: section-title content();
}

.chapter-title-wrap > .chapter-author {
string-set: chapter-author content();
}
.chapter-title-wrap {
.chapter-author {
string-set: chapter-author content();
}

.chapter-title-wrap > .chapter-subtitle {
string-set: chapter-subtitle content();
.chapter-subtitle {
string-set: chapter-subtitle content();
}
}

0 comments on commit dcf850a

Please sign in to comment.