mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 01:17:15 +00:00
[breaking change] rebuild style struct (#2021)
This commit is contained in:
@@ -32,7 +32,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="postcss">
|
||||
<style lang="less">
|
||||
.demo-stepper {
|
||||
.van-stepper {
|
||||
margin-left: 15px;
|
||||
|
94
packages/stepper/index.less
Normal file
94
packages/stepper/index.less
Normal file
@@ -0,0 +1,94 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-stepper {
|
||||
font-size: 0;
|
||||
|
||||
&__minus,
|
||||
&__plus {
|
||||
width: 40px;
|
||||
height: 30px;
|
||||
box-sizing: border-box;
|
||||
background-color: @white;
|
||||
border: 1px solid @border-color;
|
||||
position: relative;
|
||||
padding: 5px;
|
||||
vertical-align: middle;
|
||||
|
||||
&::before {
|
||||
width: 9px;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
width: 1px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: @gray-darker;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: @active-color;
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
background-color: @background-color;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
background-color: @gray;
|
||||
}
|
||||
}
|
||||
|
||||
&--disabled:active {
|
||||
background-color: @background-color;
|
||||
}
|
||||
}
|
||||
|
||||
&__minus {
|
||||
border-radius: 2px 0 0 2px;
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&__plus {
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
&__input {
|
||||
width: 33px;
|
||||
height: 26px;
|
||||
padding: 1px;
|
||||
border: 1px solid @border-color;
|
||||
border-width: 1px 0;
|
||||
border-radius: 0;
|
||||
box-sizing: content-box;
|
||||
color: @gray-darker;
|
||||
font-size: 14px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
-webkit-appearance: none;
|
||||
|
||||
&[disabled] {
|
||||
color: @gray;
|
||||
background-color: @background-color;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user