Repository navigation
Convert remaining components to CSS logical properties and remove bidi() (#1084) #1174
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -39,17 +39,18 @@ $logos: ( | |
| z-index: 10; | ||
| animation: 600ms ease 300ms both; | ||
| opacity: 0; | ||
| @include bidi(( | ||
| (right, $spacing-md, auto), | ||
| (left, auto, $spacing-md), | ||
| )); | ||
| inset-inline-end: $spacing-md; | ||
|
|
||
| &.mzp-js-show-on-load { | ||
| animation-delay: 1000ms; | ||
| } | ||
|
|
||
| &.mzp-a-slide-in { | ||
| @include bidi(((animation-name, mzp-a-slide-in-right, mzp-a-slide-in-left),)); | ||
| animation-name: mzp-a-slide-in-right; /* stylelint-disable-line no-unknown-animations */ | ||
|
|
||
| [dir='rtl'] & { | ||
| animation-name: mzp-a-slide-in-left; /* stylelint-disable-line no-unknown-animations */ | ||
| } | ||
| } | ||
|
|
||
| &.mzp-a-fade-out { | ||
|
|
@@ -81,7 +82,10 @@ $logos: ( | |
| background-position: top left; | ||
| background-repeat: no-repeat; | ||
| padding: (40px + $spacing-lg) 0 0; | ||
| @include bidi(((background-position, top left, top right),)); | ||
|
|
||
| [dir='rtl'] & { | ||
| background-position: top right; | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -102,10 +106,11 @@ $logos: ( | |
| right: 0; | ||
| top: 0; | ||
| width: 20px; | ||
| @include bidi(( | ||
| (right, 0, auto), | ||
| (left, auto, 0), | ||
| )); | ||
|
|
||
| [dir='rtl'] & { | ||
|
Contributor
Author
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. Inset-inline? |
||
| right: auto; | ||
| left: 0; | ||
| } | ||
|
|
||
| &:hover, | ||
| &:focus-visible { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ | |
| // wrapper around the label and control | ||
| .mzp-c-choice { | ||
| box-sizing: border-box; | ||
| clear: left; | ||
| clear: inline-start; | ||
| margin-bottom: 0; | ||
| margin-top: forms.$line-height-shim; // other labels have a bit of line height, mock that here for better vertical spacing | ||
| min-height: forms.$choice-height; | ||
|
|
@@ -34,8 +34,8 @@ | |
| } | ||
|
|
||
| .mzp-c-choices.mzp-l-choices-inline & { | ||
| @include bidi(((padding-right, forms.$field-h-spacing, padding-left, 0),)); | ||
| display: inline-block; | ||
| padding-inline-end: forms.$field-h-spacing; | ||
| vertical-align: top; | ||
| } | ||
| } | ||
|
|
@@ -45,8 +45,8 @@ | |
| margin-bottom: 0; | ||
| padding-top: 3px; | ||
| padding-bottom: 0; | ||
| padding-inline-start: forms.$choice-spacing; | ||
| vertical-align: top; | ||
| @include bidi(((padding-left, forms.$choice-spacing, padding-right, 0),)); | ||
|
|
||
| .mzp-c-choices & { | ||
| font-weight: normal; | ||
|
|
@@ -63,10 +63,10 @@ | |
| &[type='checkbox'], | ||
| &[type='radio'] { | ||
| box-sizing: border-box; | ||
| inset-inline-start: 0; | ||
| position: absolute; | ||
| top: 0; | ||
| z-index: 1; | ||
| @include bidi(((left, 0, right, auto),)); | ||
| } | ||
|
|
||
| // IE8 and lower don't support some of this, but they also don't support media queries | ||
|
|
@@ -93,11 +93,11 @@ | |
| cursor: pointer; | ||
| display: block; | ||
| height: forms.$choice-height; | ||
| inset-inline-start: 0; | ||
| position: absolute; | ||
| text-align: center; | ||
| top: 0; | ||
| width: forms.$choice-height; | ||
| @include bidi(((left, 0, right, auto),)); | ||
| } | ||
|
|
||
| &[type='radio'] + label::before { | ||
|
|
@@ -118,15 +118,17 @@ | |
| content: ''; | ||
| display: block; | ||
| height: 0.75rem; | ||
| left: 0.03rem; | ||
| position: absolute; | ||
| top: 0.19rem; | ||
| transform: rotate(45deg); | ||
| transform-origin: bottom right; | ||
| width: 0.35rem; | ||
| @include bidi(( | ||
| (left, 0.03rem, auto), | ||
| (right, auto, 0.83rem), | ||
| )); | ||
|
|
||
|
Contributor
Author
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. Can this be inset-inline-start?
Collaborator
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.
|
||
| [dir='rtl'] & { | ||
| left: auto; | ||
| right: 0.83rem; | ||
| } | ||
| } | ||
|
|
||
| &[type='radio']:checked + label::before { | ||
|
|
@@ -261,13 +263,13 @@ | |
| } | ||
|
|
||
| .mzp-c-choice-label + & { | ||
| padding-inline-start: forms.$choice-spacing; | ||
| padding-top: forms.$info-v-spacing; | ||
| @include bidi(((padding-left, forms.$choice-spacing, padding-right, 0),)); | ||
| } | ||
|
|
||
| .mzp-c-choice + & { | ||
| margin-top: forms.$label-v-spacing * -1; | ||
| @include bidi(((padding-left, forms.$choice-spacing, padding-right, 0),)); | ||
| padding-inline-start: forms.$choice-spacing; | ||
| } | ||
|
|
||
| .mzp-c-choice-msg + & { | ||
|
|
||
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.
Why switch to this away from inset-inline-end?!?!