Skip to content

Commit

Permalink
fix(root): 增加less文件的prettier格式化规则 合并代码
Browse files Browse the repository at this point in the history
affects: @varlet/ui
  • Loading branch information
haoziqaq committed Jan 6, 2021
1 parent 8b4c5f8 commit e74af2c
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 88 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
},
"lint-staged": {
"*.{ts,tsx,js,vue,scss}": "prettier --write",
"*.{ts,tsx,js,vue,scss,less}": "prettier --write",
"*.{ts,tsx,js,vue}": "eslint --fix",
"*.{vue,css,scss}": "stylelint --fix"
},
Expand Down
183 changes: 96 additions & 87 deletions packages/varlet-ui/src/badge/badge.less
Original file line number Diff line number Diff line change
@@ -1,94 +1,103 @@
@import "../styles/var";
@import '../styles/var';

.var {
&-fade-leave-to {
opacity: 0;
}
&-fade-leave-to {
opacity: 0;
}

&-fade-leave-active {
transition: opacity .3s;
}
&-fade-leave-active {
transition: opacity 0.3s;
}
}

.var-badge {
display: inline-block;
position: relative;
&__content {
color: #fff;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
border-radius: 100px;
font-size: 12px;
padding: 2px 6px;
vertical-align: middle;
text-align: center;
display: inline-block;
//.v-icon{
// font-size: 12px;
// margin: 0 -2px;
//}
}

&--default {
background: @color-background-base;
}

&--primary {
background: @color-primary;
}

&--info {
background: @color-info;
}

&--warning {
background: @color-warning;
}

&--success {
background: @color-success;
}

&--danger {
background: @color-danger;
}
&--right-top{
position: absolute;
top: 0;
right: 10px;
transform: translateY(-50%) translateX(100%);
}
&--left-top{
position: absolute;
top: 0;
left: 10px;
transform: translateY(-50%) translateX(-100%);
}
&--right-bottom{
position: absolute;
bottom: 0;
right: 10px;
transform: translateY(50%) translateX(100%);
}
&--left-bottom{
position: absolute;
bottom: 0;
left: 10px;
transform: translateY(50%) translateX(-100%);
}
&--position{
border: 2px #ffffff solid;
}
&--dot {
box-sizing: content-box;
width: 8px;
height: 8px;
border-radius: 8px;
padding: 0;
}
&--dot-right{
right: 6px;
}
&--dot-left{
left: 6px;
}
display: inline-block;
position: relative;

&__content {
color: #fff;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
border-radius: 100px;
font-size: 12px;
padding: 2px 6px;
vertical-align: middle;
text-align: center;
display: inline-block;
//.v-icon{
// font-size: 12px;
// margin: 0 -2px;
//}
}

&--default {
background: @color-background-base;
}

&--primary {
background: @color-primary;
}

&--info {
background: @color-info;
}

&--warning {
background: @color-warning;
}

&--success {
background: @color-success;
}

&--danger {
background: @color-danger;
}

&--right-top {
position: absolute;
top: 0;
right: 10px;
transform: translateY(-50%) translateX(100%);
}

&--left-top {
position: absolute;
top: 0;
left: 10px;
transform: translateY(-50%) translateX(-100%);
}

&--right-bottom {
position: absolute;
bottom: 0;
right: 10px;
transform: translateY(50%) translateX(100%);
}

&--left-bottom {
position: absolute;
bottom: 0;
left: 10px;
transform: translateY(50%) translateX(-100%);
}

&--position {
border: 2px #ffffff solid;
}

&--dot {
box-sizing: content-box;
width: 8px;
height: 8px;
border-radius: 8px;
padding: 0;
}

&--dot-right {
right: 6px;
}

&--dot-left {
left: 6px;
}
}

0 comments on commit e74af2c

Please sign in to comment.