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)
- `Stack` `justify` prop has no effect HOT 4
- SelectPanel2 Optimization: Do not add and remove keydown listener for escape key on every render HOT 1
- `Stack` `gap` is overridden on wider layouts
- Release Tracking
- Portal Hardcoded Z-Index Buries Components HOT 2
- Consider modern `moduleResolution` HOT 1
- Data Table Pagination - when the page numbers in the 1000s the page numbers are unreadable HOT 1
- Dockerize The entire application HOT 1
- [ActionMenu.Button] onClick doesn't function HOT 9
- "npm run setup" doesn't exist in your package.json HOT 1
- Inline `ActionList.Description` can result in horizontal overflow HOT 2
- <UnderlineNav.Item /> without counter shows loading indicator HOT 2
- Release Tracking
- `<AnchoredOverlay>` needs to be upgraded to `popover`
- Roll out tooltip in our primer/react components that uses IconButton under the hood
- test
- Release Tracking
- containsCurrentItem State Not Reset in NavList Component. HOT 1
- SelectPanel bug when we have static items list is inside same component
- Tooltip is misplaced when it is rendered on a dialog
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.