Git Product home page Git Product logo

Comments (7)

matejlatin avatar matejlatin commented on August 25, 2024 3

Yeah lots of people asked about this. It's just how line-height works on the web. The text is supposed to be sitting right in the middle of the baseline grid lines.

That can be done on the web, I've seen it already, but it gets tricky when you allow users to be able to change the font and line-height and it could get messed up really quickly.

from gutenberg.

mihaisavezi avatar mihaisavezi commented on August 25, 2024 1

I thought the idea of a baseline grid is to have text sit on the baseline --> see this screenshot. Do you see the difference between the two screenshots?

image

from gutenberg.

matejlatin avatar matejlatin commented on August 25, 2024

Hey @mihaisavezi I'm sorry but I don't see what the problem is... everything seems aligned on the screenshot... Gutenberg uses 0.5 line-height (or leading) for some measurements like margins and how many "line-heights" a heading takes. It can be 1.5, that's why we have this double grid, so you can still see if it fits.

from gutenberg.

morganfeeney avatar morganfeeney commented on August 25, 2024

I have to agree with @mihaisavezi it looks like a bug. I refer to this article: https://medium.com/written-in-code/aligning-type-to-baseline-the-right-way-using-sass-e258fce47a9b#.i6vsda3o8 as a great, yet simple, explanation of a baseline grid for web type.

from gutenberg.

mswiszcz avatar mswiszcz commented on August 25, 2024

hey @matejlatin even when looking at the gutenberg website and assuming that everything should be in the middle of the line, it looks like there are some missalignments
Capture

from gutenberg.

matejlatin avatar matejlatin commented on August 25, 2024

@mswiszcz no it's still correct actually, you need to enable the "double grid". Then those lines will also align. I tend to use the double grid so it gives more flexibility in assigning line heights and font sizes.

from gutenberg.

mswiszcz avatar mswiszcz commented on August 25, 2024

The paragraph at the very top and the one below the first headline are aligned differently, is that expected? Same with 1st and 2nd headlines. It's a bit confusing, not an expert on typo though

from gutenberg.

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.