Skip to content
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

カラムフィットで1pxのGapが効かなくなっている不具合を修正 #68 #69

Merged
merged 1 commit into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 39 additions & 37 deletions patterns-data/_scss/_vk-cols.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,54 +49,56 @@
Fit : 余白のないカラム
2カラムだけでなく3カラムや4カラムでも使用される想定
/* ----------------------------------- */
.vk-cols--fit.wp-block-columns {
&--gap1 {
.vk-cols--fit {
&--gap1.wp-block-columns {
gap:1px;
@media (min-width: 600px) and (max-width: 781px) {
.wp-block-column:not(:only-child) {
flex-basis: calc(50% - 1px)!important;
}
}
}
&,
&:not(.is-not-stacked-on-mobile){
margin-top:0;
margin-bottom:0;
justify-content: space-between;
& > .wp-block-column {
*:last-child{
margin-bottom:0;
&.wp-block-columns {
&,
&:not(.is-not-stacked-on-mobile){
margin-top:0;
margin-bottom:0;
justify-content: space-between;
& > .wp-block-column {
*:last-child{
margin-bottom:0;
}
// 編集画面用
& > .wp-block-cover{
margin-top:0;
}
}
// 編集画面用
& > .wp-block-cover{
margin-top:0;
&.has-background {
// .has-background に対してコアが付与する余白を付与
padding: 0;
}
}
&.has-background {
// .has-background に対してコアが付与する余白を付与
padding: 0;
}
@media (max-width: 599px){
// アウター&インナー両方背景指定がない場合
&:not(.has-background) > .wp-block-column:not(.has-background){
// padding-top:0 !important; カラムを積んだ時に上のカラムとくっついてしまう
padding-left:0 !important;
padding-right:0 !important;
}
}
// コアのカラムブロックの余白打ち消し
@media (min-width: 782px){
.block-editor-block-list__block.wp-block-column:not(:first-child),
& > .wp-block-column:not(:first-child) {
margin-left: 0;
@media (max-width: 599px){
// アウター&インナー両方背景指定がない場合
&:not(.has-background) > .wp-block-column:not(.has-background){
// padding-top:0 !important; カラムを積んだ時に上のカラムとくっついてしまう
padding-left:0 !important;
padding-right:0 !important;
}
}
}
@media (min-width: 600px) and (max-width: 781px){
.wp-block-column:nth-child(2n) {
margin-left: 0;
// コアのカラムブロックの余白打ち消し
@media (min-width: 782px){
.block-editor-block-list__block.wp-block-column:not(:first-child),
& > .wp-block-column:not(:first-child) {
margin-left: 0;
}
}
.wp-block-column:not(:only-child) {
flex-basis: 50% !important;
@media (min-width: 600px) and (max-width: 781px){
.wp-block-column:nth-child(2n) {
margin-left: 0;
}
.wp-block-column:not(:only-child) {
flex-basis: 50% !important;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion patterns-data/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.