Is there a way to access the final font-size values for use elsewhere in CSS?
See original GitHub issueFor instance with the core fontSize plugin, I can do this:
:root {
--foo: theme('fontSize.lg');
}
…but since the fluid type plugin calculates the final values at build time, that doesn’t work.
I realize I could use @apply in a lot of cases, but it would be useful to have direct access to the values.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
font-size - CSS: Cascading Style Sheets - MDN Web Docs
There are several ways to specify the font size, including keywords or numerical values for pixels or ems. Choose the appropriate method ...
Read more >How to get the actual rendered font when it's not defined in ...
I suggest this function: function css( element, property ) { return window.getComputedStyle( element, null ).getPropertyValue( property ); }.
Read more >How To Style Text Elements with Font, Size, and Color in ...
To get started, open fonts.google.com in you browser. There are many different fonts you can choose from in Google Fonts. This tutorial will...
Read more >Accessible Font Sizing, Explained
First, resizing text. We want to provide users with low vision a way to choose how fonts are displayed. Not in a crazy...
Read more >CSS Font-Size: A Tutorial on Text Sizing in CSS
One of the most common ways to set the size of a font is to use pixels. Pixels are a good unit of...
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 FreeTop 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
Top GitHub Comments
This looks great, thank you!
You can try it out:
npm i tailwindcss-fluid-type@next
And under plugins in your tailwind.config.js: