-
  • -

    [css-lists] How should spaces be treated in markers? · Issue #4448 · w3c/csswg-drafts (original) (raw)

    The white-space property doesn't apply to markers, but how do spaces behave in markers?

    Consider

    1. -
    2. -
    3. -
    4. -
    5. -
    6. -
    7. -
    8. -
    9. -
    10. -
    11. -
    12. -
    13. -
    14. -
    15. -
    16. -
    17. -
    18. -
    19. -
    20. -
    21. -
    22. -
    23. -
    24. -

    ol { font-family: monospace} .pre { white-space: pre } .inside { list-style-position: inside } .marker.space-1::marker { content: 'a b' } .marker.space-2::marker { content: 'a b' } .marker.space-n::marker { content: 'a\a b' } .type.space-1 { list-style-type: 'a b' } .type.space-2 { list-style-type: 'a b' } .type.space-n { list-style-type: 'a\a b' }

    The results in Firefox, Chromium legacy and Chromium with LayoutNG and look like

              | Firefox   | Chrome leg| Chrome NG |
    | ------- | --------- | --------- | --------- |
    | marker  |     a b-  |     1. -  |     1. -  |
    | default |     a b-  |     2. -  |     2. -  |
    | inside  |     a b-  |     3. -  |     3. -  |
    | ------- | --------- | --------- | --------- |
    | marker  |  a b-     |  4. -     |  4. -     |
    | default |  a b-     |  5. -     |  5. -     |
    | outside |  a b-     |  6. -     |  6. -     |
    | ------- | --------- | --------- | --------- |
    | marker  |     a b-  |     7. -  |     7. -  |
    | pre     |     a  b- |     8. -  |     8. -  |
    | inside  |     a     |     9. -  |     9. -  |
    |         |     b-    |           |           |
    | ------- | --------- | --------- | --------- |
    | marker  |  a b-     | 10. -     | 10. -     |
    | pre     | a  b-     | 11. -     | 11. -     |
    | outside |    a      | 12. -     | 12. -     |
    |         |    b-     |           |           |
    | ------- | --------- | --------- | --------- |
    | type    |     a b-  |     a b-  |     a b-  |
    | default |     a  b- |     a  b- |     a b-  |
    | inside  |     ab-   |     a b-  |     a b-  |
    | ------- | --------- | --------- | --------- |
    | type    |  a b-     |  a b-     |  a b-     |
    | default | a  b-     | a  b-     | a  b-     |
    | outside |   ab-     |  a b-     |    a      |
    |         |           |           |    b-     |
    | ------- | --------- | --------- | --------- |
    | type    |     a b-  |     a b-  |     a b-  |
    | pre     |     a  b- |     a  b- |     a  b- |
    | inside  |     ab-   |     a b-  |     a     |
    |         |           |           |     b-    |
    | ------- | --------- | --------- | --------- |
    | type    |  a b-     |  a b-     |  a b-     |
    | pre     | a  b-     | a  b-     | a  b-     |
    | outside |   ab-     |  a b-     |    a      |
    |         |           |           |    b-     |
    

    That is:

    What's the expected behavior?