Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
tailwindcss-font-size
Advanced tools
A plugin that provides utilities for font-size by 'px' and 'rem'.
A plugin that provides utilities for font-size by 'px' and 'rem'.
Install the plugin from npm:
# Using npm
npm install tailwindcss-font-size
# Using Yarn
yarn add tailwindcss-font-size
Then add the plugin to your tailwind.config.js
file:
// tailwind.config.js
module.exports = {
theme: {
// ...
},
plugins: [
require('tailwindcss-font-size'),
// ...
],
}
Use the fsz-{n}px
or fsz-{n}r
utilities to set font-size.
px
is for pixel, r
is for root font-size.
<p class="fsz-32px">This font size is 32px</p>
<p class="fsz-32r">This font size is 2rem (if option.baseSize is 16px)</p>
You can configure the plugin by passing options to its constructor.
Parameters and default values are below.
// tailwind.config.js
module.exports = {
theme: {
// ...
},
plugins: [
require('tailwindcss-font-size')({
baseSize: 16, // html font-size
minSize: 10,
maxSize: 128
}),
// ...
],
}
[0.1.0] - 2022-02-05
Initial release!
FAQs
Tailwind CSS plugin to add font-size property in px and rem
The npm package tailwindcss-font-size receives a total of 1 weekly downloads. As such, tailwindcss-font-size popularity was classified as not popular.
We found that tailwindcss-font-size demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.