Skip to content
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

RTL Alignment Issue #259

Closed
planecore opened this issue Apr 8, 2022 · 3 comments · Fixed by #310
Closed

RTL Alignment Issue #259

planecore opened this issue Apr 8, 2022 · 3 comments · Fixed by #310
Labels
bug Something isn't working

Comments

@planecore
Copy link
Contributor

Describe the bug
Cards with an icon have an alignment issue where the icon has a big margin to the right and almost zero margin to the left.
In addition, cards are overlapping each over in horizontal stacks.

To Reproduce
Steps to reproduce the behavior:

  1. Add a new card with an icon (for example Entity Card).
  2. Add a horizontal stack with two Entity Cards.

Expected behavior
The icon should behave similar to the LTR version with the same margin in each side, and cards shouldn’t overlap each over in horizontal stacks.

Screenshots
7684489A-CB83-4AEB-8D05-0192A13C5C28

Additional context
I’m running the latest versions of Mushroom, HACS, Home Assistant, Home Assistant OS and iOS.

@planecore planecore added the bug Something isn't working label Apr 8, 2022
@piitaya
Copy link
Owner

piitaya commented Apr 11, 2022

Mushroom is not compatible with RTL yet but we will add this support 🙂

@planecore
Copy link
Contributor Author

I changed all the margin-right in the code to margin-left and it looks great!

I'm not very familiar with Home Assistant tooling, but if there's a way to detect if the current layout is RTL it should be fairly simple to add support!

@piitaya
Copy link
Owner

piitaya commented Apr 14, 2022

We can detect it with the computeRTL function. I created a PR to add RTL support 😜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants