Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Allow customer account block to center align #9750

Merged
merged 6 commits into from
Jun 22, 2023
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
15 changes: 15 additions & 0 deletions assets/js/blocks/customer-account/editor.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
@import "./style";

.editor-styles-wrapper .is-layout-constrained > .wc-block-editor-customer-account.alignright {
@include flex-justify-content(flex-end);
}

.editor-styles-wrapper .is-layout-constrained > .wc-block-editor-customer-account.alignleft {
@include flex-justify-content(flex-start);
}

.editor-styles-wrapper .is-layout-constrained > .wc-block-editor-customer-account.aligncenter {
@include flex-justify-content(center);
}

.wc-block-editor-customer-account {
display: flex;
padding: em($gap-smaller) em($gap-smaller);
}

Expand Down
19 changes: 19 additions & 0 deletions assets/js/blocks/customer-account/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
@mixin flex-justify-content($justification) {
float: none;
justify-content: $justification;
}

.is-layout-constrained > .wp-block-woocommerce-customer-account.alignright {
@include flex-justify-content(flex-end);
}

.is-layout-constrained > .wp-block-woocommerce-customer-account.alignleft {
@include flex-justify-content(flex-start);
}

.is-layout-constrained > .wp-block-woocommerce-customer-account.aligncenter {
@include flex-justify-content(center);
}

.wp-block-woocommerce-customer-account {
display: flex;

a {
text-decoration: none !important;
align-items: center;
Expand Down