Giter Club home page Giter Club logo

Comments (4)

michaeltaranto avatar michaeltaranto commented on May 28, 2024 1

Hey 👋

You're right that this is due to the rounding and the sub pixel values that are produced. I have found that when vertically centering text I dont trim the space, but that decision will depend on your specific font choice.

Have been wanting to test out a rounding strategy to see if we can get away with whole value, but that is going to have the issue the other way I would assume — and extra pixel or so of space. Not sure if this is solvable under the current constraints.

from capsize.

TheMightyPenguin avatar TheMightyPenguin commented on May 28, 2024 1

I'll try not cropping text nodes for our buttons (or badges or similar components that center text vertically) and see how that feels 👍 will also try taking a look and see what else would be possible here, thanks!

from capsize.

TheMightyPenguin avatar TheMightyPenguin commented on May 28, 2024

@michaeltaranto 😄 👋

from capsize.

TheMightyPenguin avatar TheMightyPenguin commented on May 28, 2024

For context, I noticed this as I was implementing buttons in our design system (work at teamflowhq.com), and noticed the vertical centering was slightly off by a few pixels

from capsize.

Related Issues (20)

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.