Skip to content

Commit

Permalink
Merge pull request #2057 from tf/centered-quote
Browse files Browse the repository at this point in the history
Fix hanging quote position in center-ragged layout
  • Loading branch information
tf authored Jan 17, 2024
2 parents 15a6750 + ec42752 commit 8c136c4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
right: calc(100% + var(--theme-quote-hanging-mark-spacing, 0.05em));
}

.centerRagged.design-hanging .text p:first-child::before {
position: static;
padding-right: var(--theme-quote-hanging-mark-spacing, 0.05em);
margin-left: calc(-1ch - var(--theme-quote-hanging-mark-spacing, 0.05em));
}

.design-largeCentered .text p:first-child::before,
.design-largeHanging .text p:first-child::before {
font-size: var(--quote-large-mark-font-size);
Expand Down
17 changes: 17 additions & 0 deletions entry_types/scrolled/package/src/contentElements/quote/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ storiesOfContentElement(module, {
quoteDesign: 'hanging'
}
},
{
name: 'Hanging Centered Ragged',
configuration: {
text: [
{
type: 'paragraph',
children: [{text: 'Be the change\n that you wish to see in the world'}]
}
]
},
themeOptions: {
quoteDesign: 'hanging'
},
sectionConfiguration: {
layout: 'centerRagged'
}
},
{
name: 'Hanging with custom spacing',
themeOptions: {
Expand Down

0 comments on commit 8c136c4

Please sign in to comment.