Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(RTL): align text to left #1115

Merged
merged 9 commits into from
Mar 29, 2019
Merged

fix(RTL): align text to left #1115

merged 9 commits into from
Mar 29, 2019

Conversation

miroslavstastny
Copy link
Member

@miroslavstastny miroslavstastny commented Mar 27, 2019

Fixes #776.

Stardust sets dir="auto" on all text content. To correctly handle bidirectional text.
The problem is that the attribute also changes default text-align to right for RTL text (which breaks LTR layout) and to left for LTR text (which breaks RTL layout).

This fix sets text-align on ProviderBox and PopupContent explicitly to avoid the problem.

  • Changelog

@codecov
Copy link

codecov bot commented Mar 27, 2019

Codecov Report

Merging #1115 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1115   +/-   ##
=======================================
  Coverage   82.35%   82.35%           
=======================================
  Files         727      727           
  Lines        8672     8672           
  Branches     1232     1167   -65     
=======================================
  Hits         7142     7142           
  Misses       1515     1515           
  Partials       15       15
Impacted Files Coverage Δ
...hemes/teams/components/Popup/popupContentStyles.ts 40% <ø> (ø) ⬆️
...emes/base/components/Provider/providerBoxStyles.ts 50% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4d89a9...eddbf8e. Read the comment docs.

@miroslavstastny miroslavstastny merged commit 026c9d7 into master Mar 29, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/rtl-item-layout branch March 29, 2019 14:18
@@ -9,6 +9,7 @@ const popupContentStyles: ComponentSlotStylesInput<PopupContentProps, PopupConte

return {
display: 'block',
textAlign: 'left',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we are expecting this to be applied to any popup content (i.e. the one that is provided not as an object prop, but as regular react element), like in the following case:

<Popup ... content={<div>...</div>}>

then we need to apply this to Popup's popup slot in general

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTL is not consistent between List.Item and ItemLayout
3 participants