feat: 增加动画及使用BEM规范

This commit is contained in:
jiangruowei
2017-02-22 15:30:45 +08:00
parent 1417f22c3b
commit 396e46ef0a
3 changed files with 26 additions and 25 deletions

View File

@@ -17,28 +17,23 @@
box-shadow: 0 3px 1px 0 rgba(0, 0, 0, .05), 0 2px 2px 0 rgba(0, 0, 0, .1), 0 3px 3px 0 rgba(0, 0, 0, .05);
@when on {
left: 0;
transition: all .5s ease-in-out;
}
@when off {
right: 0;
left: 20px;
transition: all .5s ease-in-out;
}
}
@when on {
background-color: #44db5e;
border-color: #44db5e;
@descendent node {
left: 0;
}
}
@when off {
background-color: #fff;
border-color: rgba(0, 0, 0, .1);
@descendent node {
right: 0;
}
}
@when loading {
@@ -46,8 +41,13 @@
}
@when disabled {
background-color: #f2f2f2;
border-color: rgba(0, 0, 0, .1);
@when off {
background-color: #f2f2f2;
border-color: rgba(0, 0, 0, .1);
}
@when on {
background-color: #a6e7b1;
}
}
}
}