Skip to content

🐛 [Bug]: 官方文档中设计稿宽度为 375 的 sass 变量注入方案失效 #983

@oNo500

Description

@oNo500

问题出在哪个包

@taroify/core

正在使用的 Taroify 版本是多少

0.9.0

问题出在哪个平台/设备/浏览器

weapp

重现链接

https://codesandbox.io/p/github/oNo500/taroify-test/master?import=true

环境信息

Taro v4.0.12

Taro CLI 4.0.12 environment info:
System:
OS: macOS 15.6
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.15.0 - ~/.local/state/fnm_multishells/30387_1755267658570/bin/node
npm: 10.9.2 - ~/.local/state/fnm_multishells/30387_1755267658570/bin/npm
npmPackages:
@tarojs/cli: 4.0.12 => 4.0.12
@tarojs/components: 4.0.12 => 4.0.12
@tarojs/helper: 4.0.12 => 4.0.12
@tarojs/plugin-framework-react: 4.0.12 => 4.0.12
@tarojs/plugin-platform-alipay: 4.0.12 => 4.0.12
@tarojs/plugin-platform-h5: 4.0.12 => 4.0.12
@tarojs/plugin-platform-harmony-hybrid: 4.0.12 => 4.0.12
@tarojs/plugin-platform-jd: 4.0.12 => 4.0.12
@tarojs/plugin-platform-qq: 4.0.12 => 4.0.12
@tarojs/plugin-platform-swan: 4.0.12 => 4.0.12
@tarojs/plugin-platform-tt: 4.0.12 => 4.0.12
@tarojs/plugin-platform-weapp: 4.0.12 => 4.0.12
@tarojs/react: 4.0.12 => 4.0.12
@tarojs/runtime: 4.0.12 => 4.0.12
@tarojs/shared: 4.0.12 => 4.0.12
@tarojs/taro: 4.0.12 => 4.0.12
@tarojs/taro-loader: 4.0.12 => 4.0.12
@tarojs/webpack5-runner: 4.0.12 => 4.0.12
babel-preset-taro: 4.0.12 => 4.0.12
eslint-config-taro: 4.0.12 => 4.0.12
react: ^18.0.0 => 18.3.1

重现步骤

Image

我看到现在的版本已经使用 @use 替代了 @import,上面文档中的方案已经失效。

sass @use 建议使用 with 才能覆盖默认变量。

你知道如何解决这个问题吗

Yes

您是否愿意参与修复这个问题,并创建一个 PR

Yes

修复这个问题的解决方案

sass @use 建议使用 with 才能覆盖默认变量。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions