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

Wrong position of ordered-list counters when text-align: right #784

Closed
benbro opened this issue Jul 6, 2016 · 1 comment
Closed

Wrong position of ordered-list counters when text-align: right #784

benbro opened this issue Jul 6, 2016 · 1 comment

Comments

@benbro
Copy link
Contributor

benbro commented Jul 6, 2016

[Describe the issue]
When we use text-algin:right, the ordered-list counters should move to the right.
The bullets in unordered list also need to be fixed.
Is there a reason why the style of ol and ul is different?

Do you think the following changes are ok for ol?

/* add this */
.ql-editor ol li.ql-align-right::before {
    left: 100%;
    margin-right: -16px;
    text-align: left;
   direction: rtl; /* so we get '.1' instead of '1.'
}

/* remove this? */
.ql-editor ol {
    padding-left: 20px;
}

/* add this instead? */
.ql-editor ol li {
    padding-left: 20px;
}

.ql-editor ol li.ql-align-right {
    padding-left: 0
    padding-left: 20px;
}

https://github.com/quilljs/quill/blob/d8edb9363edcd5f577168b6c8d3fa34a7f58fc6d/assets/core.styl#L59

Steps for Reproduction

  1. Visit http://beta.quilljs.com/docs/formats/
  2. Choose align-right from the align dropdown.
  3. Click on the ordered-list button.

Expected behavior: [expected]
'.1' aligned to the right. Notice the order of the dot and number.

Actual behavior: [actual]
'1.' is aligned to the left.

Platforms: [ex. Chrome 48 on Mac 10.11]

Version: [version]
1.0-beta.6

@benbro
Copy link
Contributor Author

benbro commented Jul 6, 2016

All combinations of text-align and text-direction in Word:

list-1

list-2

list-3

list-4

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

No branches or pull requests

1 participant