一个简单的vue3+windi.css库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
872 B

/**
* 响应式 媒体查询类
**/
@import (reference) "../var.less";
.choose3(@type, @style) when (@type=xs){
@media screen and (max-width: @sm - 0.1px){
@style();
}
}
.choose3(@type, @style) when (@type=sm){
@media screen and (min-width: @sm - 0.1px) and (max-width: @md - 0.1px){
@style();
}
}
.choose3(@type, @style) when (@type=md){
@media screen and (min-width: @md - 0.1px) and (max-width: @lg - 0.1px){
@style();
}
}
.choose3(@type, @style) when (@type=lg){
@media screen and (min-width: @lg - 0.1px) and (max-width: @xl - 0.1px){
@style();
}
}
.choose3(@type, @style) when (@type=xl){
@media screen and (min-width: @xl - 0.1px) {
@style();
}
}
.loop3(@i,@style,@list) when (@i<length(@list)){
.choose3(extract(@list,@i+1),@style);
.loop3(@i+1,@style,@list);
}
.media_e(@style,@rest...){
.loop3(0,@style,@rest);
}