-
Notifications
You must be signed in to change notification settings - Fork 0
fix: add gallery is-cropped styling to facilitate logo's better #10
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
Conversation
| .wp-block-gallery { | ||
| /* Not cropped usually means images like logo's */ | ||
| &:not( .is-cropped ) { | ||
| figure.wp-block-image { |
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.
Ik haat deze diepe nesting maar het moet om de Gutenberg styles te overschrijven zonder !important
laravdiemen
left a comment
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.
Goeie! Ik gebruikte vaak een extra style voor dit soort dingen maar dit is beter.
| } | ||
|
|
||
| img { | ||
| @apply max-w-4/5!; |
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.
Misschien nog wel de border-radius voor de zekerheid weghalen? In blocks/wp/shared krijgen alle image een border-radius maar dat wil je bij logo's niet
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.
Toegevoegd!
| .wp-block-gallery { | ||
| /* Not cropped usually means images like logo's */ | ||
| &:not( .is-cropped ) { | ||
| figure.wp-block-image { | ||
| @apply mt-auto! items-center; | ||
|
|
||
| /* Overwrite Gutenberg default styles */ | ||
| @variant max-sm { | ||
| width: calc( | ||
| 25% - var( --wp--style--unstable-gallery-gap, 16px ) / 2 | ||
| ) !important; | ||
| } | ||
|
|
||
| img { | ||
| @apply max-w-4/5!; | ||
| } | ||
|
|
||
| /* Editor styling */ | ||
| > a, | ||
| > div { | ||
| @apply flex items-center justify-center; | ||
| } | ||
| } | ||
| } | ||
| } |
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.
Je kunt 1 nested niveau hier weg halen toch? Door dit achter elkaar te zetten maar wel met spatie er tussen houd jezelfde niveau aan importance hmm..
maar 1 minder tab :)
| .wp-block-gallery { | |
| /* Not cropped usually means images like logo's */ | |
| &:not( .is-cropped ) { | |
| figure.wp-block-image { | |
| @apply mt-auto! items-center; | |
| /* Overwrite Gutenberg default styles */ | |
| @variant max-sm { | |
| width: calc( | |
| 25% - var( --wp--style--unstable-gallery-gap, 16px ) / 2 | |
| ) !important; | |
| } | |
| img { | |
| @apply max-w-4/5!; | |
| } | |
| /* Editor styling */ | |
| > a, | |
| > div { | |
| @apply flex items-center justify-center; | |
| } | |
| } | |
| } | |
| } | |
| .wp-block-gallery { | |
| /* Not cropped usually means images like logo's */ | |
| &:not( .is-cropped ) figure.wp-block-image { | |
| @apply mt-auto! items-center; | |
| /* Overwrite Gutenberg default styles */ | |
| @variant max-sm { | |
| width: calc( | |
| 25% - var( --wp--style--unstable-gallery-gap, 16px ) / 2 | |
| ) !important; | |
| } | |
| img { | |
| @apply max-w-4/5!; | |
| } | |
| /* Editor styling */ | |
| > a, | |
| > div { | |
| @apply flex items-center justify-center; | |
| } | |
| } | |
| } |
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.
Goeie, done ✅
4c5ff3e to
b6c9f87
Compare
b6c9f87 to
a868803
Compare
Galerij styling juist gezet
Als je deze optie uit zet:
Krijg je de class
is-croppedop de gallerij en verdwijntobject-fit: cover;. Deze optie is perfect om voor bijv. logo's te gebruiken (wat je vaak op home pagina's ziet), alleen is de styling niet perfect.Deze PR verandert dit:
Naar dit:
Zo kun je vrij gemakkelijk een sectie met partners tonen.
Mobiel: