Coder Social home page Coder Social logo

Comments (2)

jhildenbiddle avatar jhildenbiddle commented on May 25, 2024

Hi @ryanfeeley.

TL;DR: Can't be fixed AFAIK, but options exist to work around the issue.

From what I can tell, the issue is cause by Firefox's insistence on rendering list item bullets using the -moz-bullet-font instead of inheriting the font specified for the list item. Notice in the following screenshot that ::marker pseudo-element within the ordered list inherits the font-family value (sans-serif) of its parent <li> element:

19-ol

Now, notice the font-family of the ::marker element within the unordered list:

19-ul

Why is Firefox setting font-family to -moz-bullet-font instead of sans-serif? Who knows. The good news is that we can "fix" the spacing issue by forcing the ::marker element to inherit the font-family value:

ul ::-moz-list-bullet {
  font-family: inherit;
}

Unfortunately, this change causes Firefox to render the bullets at the wrong size and position:

Before:
CleanShot 2022-01-17 at 15 04 30@2x

After:
CleanShot 2022-01-17 at 15 05 07@2x

The font-size can be adjusted, but doing so reintroduces the height issue and new vertical alignment issues:

ul ::-moz-list-bullet {
  font-family: inherit;
  font-size: 1.5em;
}

CleanShot 2022-01-17 at 15 18 38@2x

No amount of tweaking to properties like line-height or vertical-align help, so "fixing" the font-family value isn't really a great solution unless you're okay with the relatively small bullets in Firefox.

Another possible solution is to manually render a bullet for ::-moz-list-bullet pseudo-elements using the content property:

ul ::-moz-list-bullet {
  content: '●  ';
}

CleanShot 2022-01-17 at 15 33 12@2x

Unfortunately, this isn't a fix I can bake into the project because it isn't easy to override without knowing what's happening under the hood and it doesn't work well with nested lists.

I think this is worth filing a bug with Mozilla. I will add more to this thread if/when I know more.

Happy to answer any additional questions you may have. Until then, I will close the issue since there is nothing for me to do.

Thanks!

from vertical-rhythm-reset.

jhildenbiddle avatar jhildenbiddle commented on May 25, 2024

Firefox bug filed here: https://bugzilla.mozilla.org/show_bug.cgi?id=1750905

from vertical-rhythm-reset.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.