-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new text and overlay settings to image with text #944
Changes from all commits
1d9725c
e2424b5
c6429d6
84fa56e
dd4f29b
4318001
3b91df6
77297d7
fba3e41
ccc7e16
e396f37
ae84ec1
2b02983
4db27ae
52ddafe
e48ac93
a33fc5a
7016b9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,13 +82,92 @@ | |
align-items: flex-start; | ||
height: 100%; | ||
justify-content: center; | ||
align-self: center; | ||
padding: 4rem calc(4rem / var(--font-body-scale)) 5rem; | ||
} | ||
|
||
.image-with-text__content--mobile-right > * { | ||
align-self: flex-end; | ||
text-align: right; | ||
} | ||
|
||
.image-with-text__content--mobile-center > * { | ||
align-self: center; | ||
text-align: center; | ||
} | ||
|
||
.image-with-text--overlap .image-with-text__content { | ||
transform: translate(0 , -3rem); | ||
width: 90%; | ||
margin: 0 auto; | ||
} | ||
|
||
@media screen and (min-width: 750px) { | ||
.image-with-text__grid--reverse .image-with-text__content { | ||
margin-left: auto; | ||
} | ||
|
||
.image-with-text__content--bottom { | ||
justify-content: flex-end; | ||
align-self: flex-end; | ||
} | ||
|
||
.image-with-text__content--top { | ||
justify-content: flex-start; | ||
align-self: flex-start; | ||
} | ||
|
||
.image-with-text__content--desktop-right > * { | ||
align-self: flex-end; | ||
text-align: right; | ||
} | ||
|
||
.image-with-text__content--desktop-left > * { | ||
align-self: flex-start; | ||
text-align: left; | ||
} | ||
|
||
.image-with-text__content--desktop-center > * { | ||
align-self: center; | ||
text-align: center; | ||
martinamarien marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
.image-with-text--overlap .image-with-text__text-item { | ||
display: flex; | ||
padding: 3rem 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might want to remove this padding only at the top, only at the bottom or both depending on the Since we already have the margin on the section at the top and bottom. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
.image-with-text--overlap .image-with-text__content { | ||
height: auto; | ||
width: calc(100% + 4rem); | ||
min-width: calc(100% + 4rem); | ||
transform: translate(-4rem, 0); | ||
} | ||
|
||
.image-with-text--overlap .image-with-text__grid--reverse .image-with-text__content { | ||
transform: translate(4rem, 0); | ||
} | ||
|
||
.image-with-text--overlap .image-with-text__grid--reverse .image-with-text__text-item { | ||
justify-content: flex-end; | ||
} | ||
|
||
.image-with-text--overlap .image-with-text__media-item--top { | ||
align-self: flex-start; | ||
} | ||
|
||
.image-with-text--overlap .image-with-text__media-item--middle { | ||
align-self: center; | ||
} | ||
|
||
.image-with-text--overlap .image-with-text__media-item--bottom { | ||
align-self: flex-end; | ||
} | ||
|
||
.image-with-text__media-item--small, | ||
.image-with-text__media-item--large + .image-with-text__text-item { | ||
flex-grow: 0; | ||
} | ||
} | ||
|
||
@media screen and (min-width: 990px) { | ||
|
@@ -105,11 +184,14 @@ | |
margin-top: 2rem; | ||
} | ||
|
||
.image-with-text__content > :first-child:is(.image-with-text__heading) { | ||
.image-with-text__content > :first-child:is(.image-with-text__heading), | ||
.image-with-text__text--caption + .image-with-text__heading, | ||
.image-with-text__text--caption:first-child { | ||
margin-top: 0; | ||
} | ||
|
||
.image-with-text__content :last-child:is(.image-with-text__heading) { | ||
.image-with-text__content :last-child:is(.image-with-text__heading), | ||
.image-with-text__text--caption { | ||
margin-bottom: 0; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This I think creates some extra space on mobile. Seems like using a negative margin-top makes it better: video