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

Bug: when writing in RTL mode, lists with more than 9 items missing a space #1481

Closed
amitm02 opened this issue Jun 2, 2017 · 1 comment · Fixed by #1485
Closed

Bug: when writing in RTL mode, lists with more than 9 items missing a space #1481

amitm02 opened this issue Jun 2, 2017 · 1 comment · Fixed by #1485

Comments

@amitm02
Copy link

amitm02 commented Jun 2, 2017

Steps for Reproduction

  1. Set write direction to RTL
  2. Enter a numbered list with more than 9 items

Expected behavior:

The content of each item in the list will have separated from the item index.

Actual behavior:

Starting with item index 10, there is no separation between the content of the item and the item index. Bug appears in either english or Hebrew fonts.
english fonts img
hebrew fonts img

Platforms:
OSx, Chrome v58.
Include browser, operating system and respective versions

Version:
[email protected]'.

@benbro
Copy link
Contributor

benbro commented Jun 2, 2017

The RTL style should be the opposite of the LTR style.
https://github.com/quilljs/quill/blob/master/assets/core.styl#L76
This style:

li::before
    display: inline-block
    margin-right: LIST_STYLE_MARGIN
    text-align: right
    white-space: nowrap
    width: LIST_STYLE_WIDTH
li:not(.ql-direction-rtl)::before
    margin-left: -1*LIST_STYLE_OUTER_WIDTH

Should probably changed to something like:

li::before
    display: inline-block
    white-space: nowrap
    width: LIST_STYLE_WIDTH
    margin-right: LIST_STYLE_MARGIN
    margin-left: -1*LIST_STYLE_OUTER_WIDTH
    text-align: right
li.ql-direction-rtl::before
    margin-left: LIST_STYLE_MARGIN
    margin-right: -1*LIST_STYLE_OUTER_WIDTH
    text-align: left

I'll test it locally and create a PR.

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

Successfully merging a pull request may close this issue.

2 participants