-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Query Loop Block: make elements wrap and use 'gap' instead of 'margin-right' for 'post-template' #36832
Query Loop Block: make elements wrap and use 'gap' instead of 'margin-right' for 'post-template' #36832
Changes from 1 commit
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 |
---|---|---|
|
@@ -19,24 +19,18 @@ | |
flex-direction: row; | ||
display: flex; | ||
flex-wrap: wrap; | ||
|
||
gap: 1.25em; | ||
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. If we're going to switch to using 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. Yes, of course, this what I thought about too, but I thought I could do it in another PR. |
||
li { | ||
margin: 0 0 1.25em 0; | ||
width: 100%; | ||
flex: 1; | ||
min-width: 250px; | ||
margin: 0; | ||
} | ||
|
||
@include break-small { | ||
li { | ||
margin-right: 1.25em; | ||
} | ||
|
||
@include break-xlarge { | ||
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. This change effectively switches off the column count for all viewport widths less than 1080px, so if someone has set their Query Loop block to a column count of 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. you are right here, i haven't notice this. this can be fixed. thanks. |
||
@for $i from 2 through 6 { | ||
&.is-flex-container.columns-#{ $i } > li { | ||
width: calc((100% / #{ $i }) - 1.25em + (1.25em / #{ $i })); | ||
|
||
&:nth-child( #{ $i }n ) { | ||
margin-right: 0; | ||
} | ||
flex: none; | ||
} | ||
} | ||
} | ||
|
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.
Is this change needed?
padding-left
andpadding-right
are already set in the rule above.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.
yes, there is padding coming from somewhere, this is for WYSIWYG experience.