-
Notifications
You must be signed in to change notification settings - Fork 416
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
refactor: replace right
/left
with inline
corresponding values for better RTL support
#560
base: main
Are you sure you want to change the base?
Conversation
@@ -1108,7 +1103,6 @@ td { | |||
background-color: var(--pico-background-color); | |||
color: var(--pico-color); | |||
font-weight: var(--pico-font-weight); | |||
text-align: left; |
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.
left
and start
are identical so they are not needed at the current time when IE doesn't exist.
padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem) !important; | ||
padding-left: var(--pico-form-element-spacing-horizontal); |
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.
same redundancy for IE
background-image: none !important; | ||
} | ||
} | ||
[dir=rtl] :is([type=date], [type=datetime-local], [type=month], [type=time], [type=week]) { | ||
text-align: right; | ||
text-align: start; |
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.
start
in [dir=rtl]
is the right position.
padding: calc(var(--pico-block-spacing-vertical) * 0.66) var(--pico-block-spacing-horizontal); | ||
background-color: var(--pico-card-sectioning-background-color); | ||
} | ||
article > header { | ||
margin-top: calc(var(--pico-block-spacing-vertical) * -1); | ||
margin-bottom: var(--pico-block-spacing-vertical); | ||
border-bottom: var(--pico-border-width) solid var(--pico-card-border-color); | ||
border-top-right-radius: var(--pico-border-radius); | ||
border-top-left-radius: var(--pico-border-radius); | ||
border-start-start-radius: var(--pico-border-radius); |
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.
This might be confusing but border-*-*-radius
has also inline
/block
corresponding.
ref. https://developer.mozilla.org/en-US/docs/Web/CSS/border-end-end-radius
margin-inline: auto; | ||
padding-inline: var(--pico-spacing); |
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.
*-right
and *-left
can be merged into *-inline
.
right
/left
with inline
corresponding values for better rtl support
right
/left
with inline
corresponding values for better rtl supportright
/left
with inline
corresponding values for better RTL support
Hello, I've noticed that there are still dozens of usages of
right
orleft
for positioning, instead ofinline-start
orinline-end
.This PR replaces those with
inline-*
corresponding. Usinginline-*
variants will improve support for RTL languages and can simplify CSS properties in some cases.IE didn't support
inline-*
variants but IE reached EoL and Pico CSS v2 dropped its support and all modern browsers supportinline-*
so now we should be able to useinline-*
values everywhere.(Let me know if this PR is too large. I can split it into small pieces if you like.)