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

Commit

Permalink
Align text sizing in filter blocks: chips, checkboxes, buttons, dropd…
Browse files Browse the repository at this point in the history
…own (#7707)

* Align the font-size of checkbox-control component to the price slider amount

* Align the font-size of Price Slider Button to the price slider amount

* Align the font-size of Filter Reset Button to the price slider amount

* Align the font-size of Clear All Button to the price slider amount

* Align the font-size of Apply button in Editor to the price slider amount

* Align the font-size of Apply button in Frontend to the price slider amount

* Align the font-size of Price Slider Amount to the standard size

* Align the font-size of Active Filter chips to the price slider amount

* Align the font-size of Filter by Price (text) to the price slider amount

* Align the font-size of Filter by Attribute (dropdown) to the price slider amount

* Align the font-size of placeholder of Filter by Attribute (dropdown) to the price slider amount

* Change font-size for text in filters from font-size(smaller) to font-size(smaller)

As a result of discussion in PR it was agreed to check the styles with bigger font size hence the change

* Align the font-size of input text of Filter by Attribute (dropdown) to the price slider amount

* Change margin-right of checkbox-control to relative value so it better adapts to the fonts
  • Loading branch information
kmanijak authored Nov 29, 2022
1 parent 0d3e954 commit 8c857e2
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions assets/js/base/components/chip/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
}
.wc-block-components-chip__text {
flex-grow: 1;
@include font-size(small);
}
&.is-removable .wc-block-components-chip__text {
padding-right: 0.5em;
Expand Down
1 change: 1 addition & 0 deletions assets/js/base/components/filter-reset-button/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.wc-block-components-filter-reset-button {
@include filter-link-button();
@include font-size(small);
cursor: pointer;

&[disabled] {
Expand Down
6 changes: 6 additions & 0 deletions assets/js/base/components/price-slider/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
max-width: 80px;
min-width: 0;
padding: $gap-smaller;
@include font-size(small);
.wc-block-components-price-slider--is-input-inline & {
max-width: 60px;
}
Expand All @@ -144,6 +145,10 @@
display: flex;
justify-content: space-between;
margin: $gap-large 0;

.wc-block-components-formatted-money-amount {
@include font-size(small);
}
}

.wc-block-components-price-slider__actions {
Expand All @@ -155,6 +160,7 @@
button[type="submit"]:not(.wp-block-search__button).wc-block-components-filter-submit-button {
margin-top: 0;
margin-left: 0;
@include font-size(small);
}
}

Expand Down
2 changes: 2 additions & 0 deletions assets/js/blocks/active-filters/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

.wc-block-active-filters__clear-all {
@include filter-link-button();
@include font-size(small);
border: none;
margin-top: 15px;
padding: 0;
Expand Down Expand Up @@ -142,6 +143,7 @@
}

.wc-block-active-filters__list-item-name {
@include font-size(small);
display: flex;
align-items: center;
position: relative;
Expand Down
17 changes: 14 additions & 3 deletions assets/js/blocks/attribute-filter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,16 @@
}

.wc-blocks-components-form-token-field-wrapper .components-form-token-field__input-container {
@include reset-typography();
border: 0;
padding: $gap-smaller;

.components-form-token-field__input::placeholder {
color: $black;
.components-form-token-field__input {
@include font-size(small);

&::placeholder {
color: $black;
}
}

.components-form-token-field__suggestions-list {
Expand All @@ -100,6 +105,11 @@
padding: $gap-small;
}
}

.components-form-token-field__token,
.components-form-token-field__suggestion {
@include font-size(small);
}
}
}

Expand Down Expand Up @@ -143,8 +153,10 @@
}
}

// The specificity here is needed to overwrite the margin-top that is inherited on WC block template pages such as Shop.
.wc-block-filter-submit-button.wc-block-components-filter-submit-button.wc-block-attribute-filter__button {
margin-top: 0;
@include font-size(small);
}
}

Expand Down Expand Up @@ -191,6 +203,5 @@
padding: em($gap-smaller) em($gap);
@include font-size(small);
height: max-content;
line-height: normal;
width: max-content;
}
1 change: 1 addition & 0 deletions assets/js/blocks/rating-filter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
button[type="submit"]:not(.wp-block-search__button).wc-block-components-filter-submit-button {
margin-left: 0;
margin-top: 0;
@include font-size(small);
}

.wc-block-rating-filter__button {
Expand Down
1 change: 1 addition & 0 deletions assets/js/blocks/stock-filter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
button[type="submit"]:not(.wp-block-search__button).wc-block-components-filter-submit-button {
margin-left: 0;
margin-top: 0;
@include font-size(small);
}

.wc-block-stock-filter__button {
Expand Down
3 changes: 2 additions & 1 deletion packages/checkout/components/checkbox-control/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
align-items: flex-start;
display: flex;
position: relative;
@include font-size(small);
}

.wc-block-components-checkbox__input[type="checkbox"] {
Expand All @@ -17,7 +18,7 @@
height: em(24px);
width: em(24px);
margin: 0;
margin-right: $gap;
margin-right: em($gap);
min-height: em(24px);
min-width: em(24px);
overflow: hidden;
Expand Down

0 comments on commit 8c857e2

Please sign in to comment.