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

[questions/qa-upright-counters-in-vertical] Round border of ::marker for circled decimal #627

Open
yamahige opened this issue Dec 8, 2024 · 0 comments

Comments

@yamahige
Copy link

yamahige commented Dec 8, 2024

[source] (https://w3c.github.io/i18n-drafts/questions/qa-upright-counters-in-vertical.html) [en]

How about using round border of ::marker to represent circled decimal in large ordered list?
This implementation requires border, border-radius, background-color, background-clipproperty for ::marker pseudo element. (added background-color)

The circle is not a part of the text:

  • but, generated texts do not match for page search, and could not copy generated text
  • not accessible
list_circled_decimal

CSS

:root {
    writing-mode: vertical-rl;
    text-spacing-trim: trim-start;
    --color-grey: black;
}
ol.my {
    list-style: none;
    counter-reset: my-counter 0;
    li {
        counter-increment: my-counter;
    }
    li::before {
        content: counter(my-counter);
        text-combine-upright: all;
        border: thin solid var(--color-grey);
        border-radius: 50%;
        display: inline-block;
        padding-block: 0;
        padding-inline: 1px;
        margin-block: 1px;
        margin-inline-end: .5em;
    }
}
ol.my.grey li::before {
    color: white;
    background-color: var(--color-grey);
    background-clip: border-box;
}

HTML

<ol class="my">
    <li>仕込む前に生芋を1/4ぐらいの大きさにカット。</li>
    <li>すり潰した生芋</li>
    <li value="5">ながらのパケット式の定量練り、通称バタ練り機</li>
    <li>...</li>
    <li style="counter-set: my-counter 9;">「仕込む前に生芋を1/4ぐらいの大きさにカット。」</li>
    <li>(すり潰した生芋)</li>
    <li>ながらのパケット式の定量練り、通称バタ練り機</li>
    <li>...</li>
    <li style="counter-set: my-counter 99;">仕込む前に生芋を1/4ぐらいの大きさにカット。</li>
    <li>すり潰した生芋</li>
    <li>ながらのパケット式の定量練り、通称バタ練り機</li>
</ol>

<ol class="my grey">
    <li>ああああ</li>
    <li>「ああああああああああああああああああああ。」</li>
    <li>(ああ)ああ</li>
    <li style="counter-set: my-counter 9;">ああああああああああああああああああああああああ</li>
    <li>ああああああああああああああああああああああああ</li>
    <li style="counter-set: my-counter 98;">ああああああああああああああああああああああああ</li>
    <li>ああああああああああああああああああああああああ</li>
    <li>ああああああああああああああああああああああああ</li>
    <li>ああああああああああああああああああああああああ</li>
</ol>
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