Hebrew Ordered List letters are reversed
Asked Answered
S

1

1

I am having trouble with OL and hebrew letters. When trying to create an ordered list (<ol>) with hebrew letters, when it comes to higher than ten items, the letters are reversed. As you can see here (chrome):

<ol style="list-style-type: hebrew; direction: rtl; text-align: right;">
  <li>1</li>
  <li>2</li>
  <li>3</li>
  <li>4</li>
  <li>5</li>
  <li>6</li>
  <li>7</li>
  <li>8</li>
  <li>9</li>
  <li>10</li>
  <li>11</li>
  <li>12</li>
  <li>13</li>
  <li style="direction: rtl; list-style-type: hebrew;">14</li>
</ol>

http://jsfiddle.net/0zqcerhg/

For example, the 10th item, instead of יא is written אי, which is wrong. this is true for 12th, 13, 14 and so on...

Sharitasharity answered 3/3, 2015 at 12:4 Comment(0)
A
2

This isn't an "official" answer but a trick to get the same result with a different solution.

ol {
    counter-reset: num;
    direction: rtl;
}
li {
    list-style-type: none;
    counter-increment: num;
    padding-bottom: 4px;
}

li:before {
    content: '.' counter(num, hebrew);
    padding-left: 10px;
    unicode-bidi: bidi-override;
    direction: ltr;
    float: right;
}
<ol style="list-style-type: hebrew; direction: rtl;">
  <li>1</li>
  <li>2</li>
  <li>3</li>
  <li>4</li>
  <li>5</li>
  <li>6</li>
  <li>7</li>
  <li>8</li>
  <li>9</li>
  <li>10</li>
  <li>11</li>
  <li>12</li>
  <li>13</li>
  <li>14</li>
</ol>

http://jsfiddle.net/moshfeu/pchady8e/1/

Thanks to @RC. for his answer (Custom <ol> numbering with Hebrew numerals)

Archaeornis answered 27/12, 2015 at 11:22 Comment(3)
Thanks @YogliB. Maybe it broke down over time. Anyway, I updated the snippet.Archaeornis
From what I saw, it's a bug that happens only on chrome (checked FF). Thanks for the upd8!Beanie
NP, glad I could help :)Archaeornis

© 2022 - 2024 — McMap. All rights reserved.