Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postcss-assets width height function 生成的px单位不会转化为vw尺寸 #21

Open
alphapidev opened this issue Jun 12, 2023 · 0 comments

Comments

@alphapidev
Copy link

alphapidev commented Jun 12, 2023

/// 引用图片,自动获取图片的宽高
/// 但不设置背景
/// @param {string} $url [图片的路径]

@mixin wh($url) {
width: width($url);
height: height($url);
}

该代码使用postcss-assets插件自动生成图片宽高,该功能生成的代码不会转化为vw,仍为px

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant