@lazy_sock/tailwindcss-fluid-typography

1.0.2 • Public • Published

tailwindcss-fluid-typography

A tailwindcss plugin generating clamp functions directly in tailwind.

Installation

Install it:

npm i @lazy_sock/tailwindcss-fluid-typography

Then add it to the tailwind config:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
  theme: {
    extend: {},
  },
  plugins: [require("@lazy_sock/tailwindcss-fluid-typography")],
};

Usage

<div class="fluid-[1_3_500_1000]">Lorem Ipsum</div>

You have to provide four parameters: the lowest font size (in rem), the highest font-size (in rem), the vw where scaling starts (in px) and the vw where scaling ends (in px). Those parameters are seperated by a underscore ( _ ).
If you don't know what those parameters are, check out this guide about scaling font-size linearly.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @lazy_sock/tailwindcss-fluid-typography

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

3.49 kB

Total Files

4

Last publish

Collaborators

  • lazy_sock