├── .gitattributes ├── .github └── workflows │ ├── pages.yml │ ├── publish.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .npmrc ├── .vscode └── settings.json ├── CHANGELOG.md ├── CONTRIBUTING-en.md ├── CONTRIBUTING.md ├── LICENSE ├── README-zh.md ├── README.md ├── commitlint.config.cjs ├── eslint.config.js ├── package.json ├── playground ├── .DS_Store ├── package.json ├── spa │ ├── .gitignore │ ├── __tests__ │ │ └── spa.spec.ts │ ├── index.html │ ├── package.json │ ├── pnpm-lock.yaml │ ├── postcss.config.cjs │ ├── public-typescript │ │ ├── flexible.ts │ │ └── manifest.json │ ├── public │ │ └── vite.svg │ ├── src │ │ ├── App.css │ │ ├── App.tsx │ │ ├── assets │ │ │ └── react.svg │ │ ├── components │ │ │ ├── A │ │ │ │ ├── index.module.css │ │ │ │ └── index.tsx │ │ │ ├── B │ │ │ │ ├── index.module.css │ │ │ │ └── index.tsx │ │ │ ├── C │ │ │ │ ├── index.module.css │ │ │ │ └── index.tsx │ │ │ ├── D │ │ │ │ ├── index.module.css │ │ │ │ └── index.tsx │ │ │ └── E │ │ │ │ ├── index.module.css │ │ │ │ └── index.tsx │ │ ├── device.ts │ │ ├── index.css │ │ ├── index.module.css │ │ ├── main.tsx │ │ ├── tailwind.css │ │ └── vite-env.d.ts │ ├── tailwind.config.cjs │ └── vite.config.ts ├── test-utils.ts ├── tsconfig.json ├── vitestGlobalSetup.ts └── vitestSetup.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── src ├── index.ts ├── types.ts └── utils │ ├── constant.ts │ ├── index.ts │ ├── parse-query.ts │ └── pixel-unit-regex.ts ├── tests └── pxtorem.test.ts ├── tsconfig.json ├── tsup.config.ts ├── vitest.config.e2e.ts └── vitest.config.ts /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.github/workflows/pages.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/.github/workflows/pages.yml -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/.npmrc -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.experimental.useFlatConfig": true 3 | } 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CONTRIBUTING-en.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/CONTRIBUTING-en.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/LICENSE -------------------------------------------------------------------------------- /README-zh.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/README-zh.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/README.md -------------------------------------------------------------------------------- /commitlint.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@minko-fe'], 3 | } 4 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/eslint.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/package.json -------------------------------------------------------------------------------- /playground/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/.DS_Store -------------------------------------------------------------------------------- /playground/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/package.json -------------------------------------------------------------------------------- /playground/spa/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/.gitignore -------------------------------------------------------------------------------- /playground/spa/__tests__/spa.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/__tests__/spa.spec.ts -------------------------------------------------------------------------------- /playground/spa/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/index.html -------------------------------------------------------------------------------- /playground/spa/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/package.json -------------------------------------------------------------------------------- /playground/spa/pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/pnpm-lock.yaml -------------------------------------------------------------------------------- /playground/spa/postcss.config.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/postcss.config.cjs -------------------------------------------------------------------------------- /playground/spa/public-typescript/flexible.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/public-typescript/flexible.ts -------------------------------------------------------------------------------- /playground/spa/public-typescript/manifest.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/public-typescript/manifest.json -------------------------------------------------------------------------------- /playground/spa/public/vite.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/public/vite.svg -------------------------------------------------------------------------------- /playground/spa/src/App.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/App.css -------------------------------------------------------------------------------- /playground/spa/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/App.tsx -------------------------------------------------------------------------------- /playground/spa/src/assets/react.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/assets/react.svg -------------------------------------------------------------------------------- /playground/spa/src/components/A/index.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/components/A/index.module.css -------------------------------------------------------------------------------- /playground/spa/src/components/A/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/components/A/index.tsx -------------------------------------------------------------------------------- /playground/spa/src/components/B/index.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /playground/spa/src/components/B/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/components/B/index.tsx -------------------------------------------------------------------------------- /playground/spa/src/components/C/index.module.css: -------------------------------------------------------------------------------- 1 | /* pxtorem?rootValue=32 */ 2 | .c { 3 | font-size: 16px; 4 | } 5 | -------------------------------------------------------------------------------- /playground/spa/src/components/C/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/components/C/index.tsx -------------------------------------------------------------------------------- /playground/spa/src/components/D/index.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/components/D/index.module.css -------------------------------------------------------------------------------- /playground/spa/src/components/D/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/components/D/index.tsx -------------------------------------------------------------------------------- /playground/spa/src/components/E/index.module.css: -------------------------------------------------------------------------------- 1 | .e1 { 2 | font-size: 16px; 3 | } 4 | -------------------------------------------------------------------------------- /playground/spa/src/components/E/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/components/E/index.tsx -------------------------------------------------------------------------------- /playground/spa/src/device.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/device.ts -------------------------------------------------------------------------------- /playground/spa/src/index.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/index.css -------------------------------------------------------------------------------- /playground/spa/src/index.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/index.module.css -------------------------------------------------------------------------------- /playground/spa/src/main.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/main.tsx -------------------------------------------------------------------------------- /playground/spa/src/tailwind.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/src/tailwind.css -------------------------------------------------------------------------------- /playground/spa/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /playground/spa/tailwind.config.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/tailwind.config.cjs -------------------------------------------------------------------------------- /playground/spa/vite.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/spa/vite.config.ts -------------------------------------------------------------------------------- /playground/test-utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/test-utils.ts -------------------------------------------------------------------------------- /playground/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/tsconfig.json -------------------------------------------------------------------------------- /playground/vitestGlobalSetup.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/vitestGlobalSetup.ts -------------------------------------------------------------------------------- /playground/vitestSetup.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/playground/vitestSetup.ts -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'playground/**' 3 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/src/types.ts -------------------------------------------------------------------------------- /src/utils/constant.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/src/utils/constant.ts -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/src/utils/index.ts -------------------------------------------------------------------------------- /src/utils/parse-query.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/src/utils/parse-query.ts -------------------------------------------------------------------------------- /src/utils/pixel-unit-regex.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/src/utils/pixel-unit-regex.ts -------------------------------------------------------------------------------- /tests/pxtorem.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/tests/pxtorem.test.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/tsconfig.json -------------------------------------------------------------------------------- /tsup.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/tsup.config.ts -------------------------------------------------------------------------------- /vitest.config.e2e.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/vitest.config.e2e.ts -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minko-fe/postcss-pxtorem/HEAD/vitest.config.ts --------------------------------------------------------------------------------