Skip to content
PluginStats

tailwind3-scale weekly downloads statistics

By ldystudio · npm · Tailwind plugins

Tailwind CSS v3 移动端适配插件,基于设计稿像素的等比缩放方案,兼容 iOS 13

View on npm Stale · Oct 18, 2026

tailwind3-scale has 4 recorded weekly downloads on npm, ranking #2271 of 2,391 tracked listings.

Weekly downloads
4
Official API · Oct 18, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#2271
Among tracked npm listings

About tailwind3-scale

tailwind3-scale

Tailwind CSS v3 移动端适配插件,基于设计稿像素的等比缩放方案。相比 Tailwind v4 方案,本插件使用 v3 plugin API,适合需要兼容 iOS 13 / Safari 13 的项目。

安装

npm install tailwind3-scale
# 或
bun add tailwind3-scale
# 或
pnpm add tailwind3-scale

需要 Tailwind CSS v3:

npm install -D tailwindcss@^3.4 autoprefixer postcss

使用方式

在 tailwind.config.js 中注册插件:

module.exports = {
  content: ["./src/**/*.{html,js,ts,jsx,tsx,vue}"],
  plugins: [require("tailwind3-scale")],
};

然后直接使用 -s- 工具类:

<div class="w-s-100 h-s-44 px-s-16 text-s-14 rounded-s-8 -mt-s-10">
  设计稿像素等比缩放
</div>

在 JS 中使用

对于需要在 JavaScript 中动态设置缩放值的场景,可以导入 scale 函数:

const { scale, scaleInt } = require("tailwind3-scale/js");

scale(100); // "calc(var(--tw-scale) * 100)"
scale(-20); // "calc(var(--tw-scale) * -20)"
scale(0); // "0"
scale(100, "--my-scale"); // "calc(var(--my-scale) * 100)"

scaleInt(100); // 100,返回当前视口下与 scale(100) 等效的整数 px
scaleInt(100, { viewportWidth: 390 }); // 104

ESM 也支持:

import { scale, scaleInt } from "tailwind3-scale/js";

工具类说明

所有工具类使用 -s- 后缀,数字对应设计稿像素值:

类名CSS 属性示例
w-s-{n}widthw-s-100
h-s-{n}heighth-s-44
min-w-s-{n} / max-w-s-{n}min-width / max-widthmax-w-s-375
min-h-s-{n} / max-h-s-{n}min-height / max-heightmin-h-s-100
size-s-{n}width + heightsize-s-44
p-s-{n} / px-s-{n} / py-s-{n}paddingpx-s-16
pt-s-{n} / pr-s-{n} / pb-s-{n} / pl-s-{n}padding-*pt-s-12
m-s-{n} / mx-s-{n} / my-s-{n}marginmy-s-20
mt-s-{n} / mr-s-{n} / mb-s-{n} / ml-s-{n}margin-*mt-s-20
gap-s-{n} / gap-x-s-{n} / gap-y-s-{n}gapgap-s-12
top-s-{n} / right-s-{n} / bottom-s-{n} / left-s-{n}inset sidetop-s-44
inset-s-{n} / inset-x-s-{n} / inset-y-s-{n}insetinset-x-s-16
rounded-s-{n}border-radiusrounded-s-8
text-s-{n}font-sizetext-s-14
leading-s-{n}line-heightleading-s-20
border-s-{n}border-widthborder-s-1
outline-offset-s-{n}outline-offsetoutline-offset-s-2
translate-x-s-{n} / translate-y-s-{n}transform translatetranslate-x-s-10
scroll-m-s-{n} / scroll-p-s-{n}scroll margin/paddingscroll-mt-s-16
indent-s-{n}text-indentindent-s-32
tracking-s-{n}letter-spacingtracking-s-1
basis-s-{n}flex-basisbasis-s-100
负值支持

支持负值的属性可使用 - 前缀:

<div class="-mt-s-10 -left-s-20 -translate-x-s-20"></div>
任意值支持

默认会生成 0..812 范围内的裸数字类名。范围外或小数可以使用 Tailwind v3 任意值语法:

<div class="w-s-[137] text-s-[13.5]"></div>

任意值只接受“设计稿像素数字”,不要带单位。使用 w-s-[10px] 会生成无效语义的 calc(var(--tw-scale) * 10px)。

原理

默认基于 375px 设计稿:

  • --tw-scale: 0.0625rem,即 1 设计稿像素 = 1 / 16rem
  • html { font-size: 4.26667vw },即 100vw / 375 * 16
  • 新浏览器使用 clamp() 限制最小/最大根字号
  • 旧 iOS/Safari 不支持 clamp() 时,回退到普通 vw 根字号
设计稿宽度视口宽度1remw-s-100 实际宽度
375px375px16px100px
375px750px32px200px
375px320px13.65px85.3px

自定义配置

module.exports = {
  content: ["./src/**/*.{html,js,ts,jsx,tsx,vue}"],
  plugins: [
    require("tailwind3-scale")({
      designWidth: 390,
      minWidth: 320,
      maxWidth: 480,
      rootFontSize: 16,
      max: 1200,
      cssVar: "--tw-scale",
      viewportFontSizeVar: "--tw-viewport-font-size",
      includeClamp: true,
    }),
  ],
};
```…

Description from the npm listing.

  • tailwindcss
  • tailwind
  • tailwindcss-plugin
  • mobile
  • scale
  • responsive
  • ios13

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

tailwind3-scale weekly downloads on npm, last 90 days: 4 weekly downloads as of Oct 18, 2026.tailwind3-scaleWeekly downloads on npm · Last 90 days4downloads / week3.63.844.24.4Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 18, 2026pluginstats.com
tailwind3-scale weekly downloads on npm, last 90 days: 4 weekly downloads as of Oct 18, 2026.

7/30/90-day growth

tailwind3-scale weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.tailwind3-scaleWeekly downloads growth on npm4downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
tailwind3-scale weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

tailwind3-scale npm ranking history: currently #2271 (by weekly downloads).tailwind3-scalenpm ranking · by weekly downloads · Last 90 days#2271current rank#2269#2270#2271#2272#2273Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 21, 2026 – Oct 21, 2026 · 1 observations · Updated Oct 18, 2026pluginstats.com
tailwind3-scale npm ranking history: currently #2271 (by weekly downloads).

Listing placement

All npm2,389 listings · 120 pages · 1,195 shown · page 116, #9 (overall #2,309)
All npm: every listing in weekly downloads order

Listing placement

Tailwind plugins257 listings · 13 pages · page 13, #12 (overall #252)
Tailwind plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (1)
Recent weekly downloads observations for tailwind3-scale
Date (UTC)Weekly downloadsChange vs. previous
4—

Similar npm Tailwind plugins plugins

All 20 tailwind3-scale alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/tailwind3-scale. First seen Oct 21, 2026; last successful collection Oct 21, 2026. See the methodology.