Initial commit: fluid type scale

This commit is contained in:
Priyanka Solis 2026-03-11 09:20:00 +00:00
commit 3c65cc1d9f
4 changed files with 46 additions and 0 deletions

16
LICENSE Normal file
View 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
View 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
View 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
View 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"
}
}