Skip to content

postcss-rem-to-viewport@2.0.0

Choose a tag to compare

@github-actions github-actions released this 18 Dec 08:50
· 68 commits to main since this release

Major Changes

  • 26db775 Thanks @sonofmagic! - 性能优化:预计算 rem->viewport 换算因子,减少每个声明的重复计算;缓存选择器黑名单匹配结果并增加早退逻辑。基准测试相对 1.0.3(small/medium/large)约提升 5.34x / 2.87x / 2.76x。

Patch Changes

  • a93567c Thanks @sonofmagic! - Extract common utilities into postcss-plugin-shared and refactor related plugins to reuse them.

  • 92f38a5 Thanks @sonofmagic! - 提炼并统一多个插件的公共能力到 postcss-plugin-shared:

    • 新增 createUnitRegex(可配置单位/跳过规则)并用其生成默认的 pxRegex/remRegex
    • 新增 createAdvancedPropListMatcher 支持 pxtrans 的高级 propList 语法(包含/排除、前后缀、contains)
    • 新增 maybeBlacklistedSelector(非字符串 selector 返回 undefined)
    • 新增 createConfigGetter 用于构建 getConfig(基于 mergeOptions,数组覆盖而非合并)
  • ad0db2b Thanks @sonofmagic! - Use strict half-up rounding for numeric conversions to avoid floating-point edge cases.

  • Updated dependencies [a93567c, 92f38a5]:

    • postcss-plugin-shared@1.0.0