Skip to content

The basic example of list-style-type in the playground shows unexpected results #2255

Open
@rozsazoltan

Description

@rozsazoltan

I copied it a bit hastily and was about to share it, but I was surprised that I didn't see a list even though I had added the class. Moreover, the same thing works fine with a div right away.

<ul class="list-disc">
  <li>Now this is a story all about how, my life got flipped-turned upside down</li>
  <!-- ... -->
</ul>
<ol class="list-decimal">
  <li>Now this is a story all about how, my life got flipped-turned upside down</li>
  <!-- ... -->
</ol>
<ul class="list-none">
  <li>Now this is a story all about how, my life got flipped-turned upside down</li>
  <!-- ... -->
</ul>

Just a quick thought like, "WTF?" then I realized. Preflight reset the padding on ol and ul, so I just need to revert it.

<ul class="list-disc p-[revert]">
  <li>Now this is a story all about how, my life got flipped-turned upside down</li>
  <!-- ... -->
</ul>
<ol class="list-decimal p-[revert]">
  <li>Now this is a story all about how, my life got flipped-turned upside down</li>
  <!-- ... -->
</ol>
<ul class="list-none p-[revert]">
  <li>Now this is a story all about how, my life got flipped-turned upside down</li>
  <!-- ... -->
</ul>

Maybe this should be mentioned? Just a passing thought - I'm leaving it here. It might be nonsense, and maybe my surprise is amplifying what's actually a real or imagined gap. It's very rare that I would use the list on its own like this. So far, I never really noticed it before - I just moved on. But this time, I got stuck because visually, I couldn't see that anything had happened. What was misleading was the photo attached to the Basic Example, which led me to believe that I should definitely be seeing something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions