-
Notifications
You must be signed in to change notification settings - Fork 26
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
fix: Tabs: Initial clean up, get rtl and ltr consistent #5431
Conversation
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
Note The build needs to finish before your changes are deployed. |
margin-left: 0; | ||
} | ||
:host([dir="rtl"]:first-child) .d2l-tab-text { | ||
margin-left: 0.6rem; |
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.
margin-right
for first child for LTR is actually 0.5rem
so this was inconsistent in RTL. Let me know if there was a reason why that I'm missing.
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.
Can we remove RtlMixin
entirely from some of these are is the dir
attribute still needed for something?
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.
Ah I see Dave already asked that elsewhere -- ignore this one.
width: calc(100% - 0.6rem); | ||
} | ||
:host([dir="rtl"]:first-child) .d2l-tab-selected-indicator { | ||
margin-left: 0.6rem; |
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 is handled in the css for d2l-tab-selected-indicator
above.
@@ -37,7 +37,6 @@ export const TabMixin = superclass => class extends SkeletonMixin(superclass) { | |||
width: calc(100% - 1.2rem); | |||
} | |||
:host(:first-child) .d2l-tab-selected-indicator { | |||
margin-inline-end: 0.6rem; |
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 wasn't needed
@@ -15,7 +15,6 @@ class Tab extends TabMixin(LitElement) { | |||
white-space: nowrap; | |||
} | |||
:host(:first-child) .d2l-tab-text { | |||
margin-inline-end: 0.6rem; |
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 wasn't yet used but was inconsistent with the current LTR behaviour (which would have margin-inline-end
as 0.5rem
)
@@ -19,34 +19,6 @@ const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches; | |||
|
|||
const scrollButtonWidth = 56; | |||
|
|||
// remove once IE11 is no longer supported | |||
if (!Array.prototype.findIndex) { |
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.
no longer needed
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
If we want to go so far as to eliminate the use of |
Only skimmed this but if it's relevant to this or future changes remember we have |
We check for dir in a variety of places in the js in tabs.js. In each spot I can just do a |
I'm fine with doing the But if we want to store the value in a shared spot to reduce the calls, we'd just want to do it in a spot such that it gets updated when we change the language in our demo pages. I'm not convinced this is worth it. I might be inclined to put the |
…ceUI/core into tabs-consistent-styles-cleanup
🎉 This PR is included in version 3.88.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Part of this ticket
The purpose of this PR is to get the LTR and RTL styles consistent in order to make reading the vdiffs easier with the changes to use the new tab structure/component