Comments (4)
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
and00
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.
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.
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.
That's a good question. Maybe for v12? 😭
from react.
Related Issues (20)
- `colorSchemes` calculation slows down initial load
- IconButton is using color `fg.default` instead of `fg.muted` HOT 2
- Simplify custom-element react bindings with util
- PageLayout doesn't extend the sidebar divider when extending the height.
- Deprecate and remove the input `contrast` prop HOT 3
- Disabled inputs look the same as enabled inputs in dark themes
- RelativeTime should render some kind of date in SSR HOT 1
- Dialog: Focus shifts unexpectedly on opening HOT 2
- NavList.Item active state should show up as bold, but doesn't. HOT 2
- Sub-component pattern cause error when used in React Server Components HOT 1
- Get ActionBar axe clean
- Type checking is too slow HOT 3
- Clean up custom element styled class names
- Underline nav: Doesn't work well on the smallest breakpoints HOT 8
- Release Tracking
- Setting `required` to `input` element within `TextInput` HOT 2
- TypeError: CSS.supports is not a function when running Jest tests HOT 1
- Active `NavList.Item` is incorrectly missing bold styling HOT 4
- The theme object inflates bundle size. HOT 1
- Release Tracking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.