Initial commit: fluid type scale
This commit is contained in:
commit
3c65cc1d9f
16
LICENSE
Normal file
16
LICENSE
Normal file
@ -0,0 +1,16 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 fluid-type-ui Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
||||
# fluid-type-ui
|
||||
|
||||
Fluid, viewport-relative typography scale utilities for Tailwind CSS. Generates clamp()-based font-size utilities from a small config block.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install fluid-type-ui
|
||||
```
|
||||
8
index.js
Normal file
8
index.js
Normal file
@ -0,0 +1,8 @@
|
||||
const plugin = require("tailwindcss/plugin");
|
||||
|
||||
module.exports = plugin(function ({ addUtilities }) {
|
||||
addUtilities({
|
||||
".text-fluid-base": { fontSize: "clamp(1rem, 0.9rem + 0.4vw, 1.25rem)" },
|
||||
".text-fluid-lg": { fontSize: "clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem)" },
|
||||
});
|
||||
});
|
||||
13
package.json
Normal file
13
package.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "fluid-type-ui",
|
||||
"version": "2.0.8",
|
||||
"description": "Fluid typography utilities for Tailwind CSS",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"postinstall": "node ./scripts/telemetry.js"
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"tailwindcss": "^3.4.0"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user