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

less 报错了 #2829

Closed
pei-zheng-yi opened this issue Jun 5, 2023 · 3 comments
Closed

less 报错了 #2829

pei-zheng-yi opened this issue Jun 5, 2023 · 3 comments

Comments

@pei-zheng-yi
Copy link

commitid:1e8fab3fe5dcac78e9d2c53682527259234f95ce

[vite] Internal server error: [less] Missing closing ')' 23:23:44
Plugin: vite:css
File: /Users/xxx//vue-vben-admin/src/components/Modal/src/index.less:111:26
109| }
110|
111| @media screen and (height <= (600px)) {
| ^
112| .ant-modal {
113| top: 60px;

@pei-zheng-yi pei-zheng-yi changed the title less less 报错了 Jun 5, 2023
@896518640
Copy link

解决了吗 我也遇到了

@RRRRRRRRen
Copy link

RRRRRRRRen commented Jun 6, 2023

perf: 优化modal弹窗样式 (#2824)
应该是这条提交记录意外的格式化了样式,产生了无法识别的less语法导致的。
改回去就好啦
@media screen and (max-height: 600px) {
.ant-modal {
top: 60px;
}
}

@media screen and (max-height: 540px) {
.ant-modal {
top: 30px;
}
}

@media screen and (max-height: 480px) {
.ant-modal {
top: 10px;
}
}

@lessroc
Copy link
Contributor

lessroc commented Jul 26, 2023

这是升级stylelint依赖引发的问题

stylelint 14.16.0添加了media-feature-range-notation规则

允许:

@media screen and (500px <= width <= 1200px) {
  .bar {
    display: block;
  }
}

不允许:

@media screen and (min-width: 500px) and (max-width: 1200px) {
  .bar {
    display: block;
  }
}

perf: 解决提交代码时stylelint格式化less和scss的媒体查询为不支持的语法(Media Queries Level 4) #2931

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

5 participants