Giter VIP home page Giter VIP logo

Comments (4)

broccolini avatar broccolini commented on March 29, 2024 1

I think this takes a moment for folks to get use to (it did for me), but I felt going from smallest to largest was the best approach for a few reasons:

  • font sizes are a scale, going from smallest to largest maps to our other scales
  • it's an array of font sizes, going from smallest to largest seems logical
  • we can add onto the font-scale easily and don't have to think about adding things like 0 and 00 which is a corner we're backed into right now
  • mapping the font scale to heading sizes mis-communicates how they are to be used, we want to separate html semantics from presentational styles so that we encourage people to write semantic markup and use the visual styles needed, trying to map font-sizes to heading tags could encourage a behavior we don't want to encourage

from react.

shawnbot avatar shawnbot commented on March 29, 2024

So yeah, to sum up: the inverse mapping is a stepping stone from Primer CSS to the props API we want to see. Closing! ✌️

from react.

emplums avatar emplums commented on March 29, 2024

Sounds good to me! I totally agree that going from smallest to largest makes the most sense, should I make an issue on primer/primer to eventually move the font size utilities to this scale as well?

from react.

shawnbot avatar shawnbot commented on March 29, 2024

That's a good question. Maybe for v12? 😭

from react.

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.