Heading components (H1,H2,H3,H4,H5,H6) are not mapping as per documentation
See original GitHub issueHi there,
In the documentation on the README.MD file we have the following section:
export default {
colors: {
text: '#000',
background: '#fff',
primary: 'tomato',
},
spacing: [10, 12, 14],
fontSize: [16, 20, 24],
text: {
h1: {
fontSize: 3, // this is 24px, taken from `fontSize` above
},
p: {
fontSize: 1, // & this is 16px, taken from `fontSize` above
},
},
}
After testing this, I found that:
h1: {
fontSize: 3, // this is 24px, taken from `fontSize` above
},
For me, the 3 is used as the font size in pixel (3 pixels) and not mapping to the fontSize set (fontSize: [16, 20, 24],) above.
Is this expected? When I avoid putting the H fontSize styling into my theme, the defaults are working correctly when switching H1 to H2, to H3 and so on…
If this is expected, how would one map other text components if Heading (H) components are just defaulting.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Headings | Web Accessibility Initiative (WAI) - W3C
Skipping heading ranks can be confusing and should be avoided where possible: Make sure that a <h2> is not followed directly by an...
Read more ><h1>–<h6>: The HTML Section Heading elements
Heading information can be used by user agents to construct a table of contents for a document automatically. Do not use heading elements...
Read more >Google Explains How to Use Headings for SEO
Google's John Mueller explains the proper use of heading elements (H1, H2, H3) for SEO.
Read more >HTML Headings: The Complete Guide To Adding Headlines ...
HTML Headings: The Complete Guide To Adding Headlines For Document Structure. In HTML Tags. Disclosure: Your support helps keep the site running!
Read more >Headings | Usability & Web Accessibility - Yale University
Table of Contents Benefits of Headings Using Headings Development Best ... in the header and the document title both <h1> elements is becoming...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I created a PR for fixing the documentation: https://github.com/nandorojo/dripsy/pull/38
I actually verified that it wasn’t outside the range before making this issue.
That said, I just changed
fontSize: [16, 20, 24],tofontSizes: [16, 20, 24],and now it works… 🤔