chore: fix radio hover style & modify .gitignore

This commit is contained in:
07akioni 2019-10-25 11:36:24 +08:00
parent 3ac852bc81
commit 9db1eee9dd
6 changed files with 15 additions and 24 deletions

1
.gitignore vendored
View File

@ -6,5 +6,6 @@ test-size
test/unit/coverage
package-lock.json
yarn.lock
lib
.vscode
*.swp

View File

@ -12,7 +12,7 @@
</n-icon>
<n-icon
size="40"
color="#000000"
color="red"
>
<md-cash />
</n-icon>

View File

@ -2,10 +2,6 @@
export default {
name: 'NIcon',
props: {
// type: {
// type: Object,
// default: null
// },
size: {
type: [Number, String],
default: null

View File

@ -3,13 +3,15 @@
@include themes-mixin {
@include b(radio) {
outline: none;
position: relative;
user-select: none;
display: inline-flex;
vertical-align: middle;
align-items: center;
margin-right: 18px;
@include once {
outline: none;
position: relative;
user-select: none;
display: inline-flex;
vertical-align: middle;
align-items: center;
margin-right: 18px;
}
@include e(control) {
box-shadow: map-get($--radio-box-shadow, 'default');
transition: box-shadow .3s $default-cubic-bezier;
@ -105,20 +107,10 @@
border-top: 1px solid map-get($--radio-button-border-color, 'default');
border-bottom: 1px solid map-get($--radio-button-border-color, 'default');
transition: background-color .3s $default-cubic-bezier, opacity .3s $default-cubic-bezier, border-color .3s $default-cubic-bezier, color .3s $default-cubic-bezier;
// @include e(label) {
// color: map-get($--radio-button-label-color, 'default');
// height: 26px;
// line-height: 26px;
// display: inline-block;
// white-space: nowrap;
// margin-left: 14px;
// margin-right: 14px;
// transition: color .3s $default-cubic-bezier;
// }
@include e(border-mask) {
pointer-events: none;
position: absolute;
box-shadow: inset 0 0 0 1px transparent;
box-shadow: inset 0 0 0 $--radio-border-mask-width transparent;
transition: box-shadow .3s $default-cubic-bezier;
left: -1px;
bottom: -1px;
@ -147,7 +139,7 @@
cursor: pointer;
&:hover {
@include e(border-mask) {
box-shadow: inset 0 0 0 1px map-get($--radio-button-border-color, 'hover');
box-shadow: inset 0 0 0 $--radio-border-mask-width map-get($--radio-button-border-color, 'hover');
transition: box-shadow .3s $default-cubic-bezier;
}
@include not-m(checked) {

View File

@ -26,4 +26,5 @@
'hover': $--n-primary-color
) !global;
$--radio-disabled-opacity: .4 !global;
$--radio-border-mask-width: 1px !global;
}

View File

@ -26,4 +26,5 @@
'hover': $--n-primary-color
) !global;
$--radio-disabled-opacity: .4 !global;
$--radio-border-mask-width: 0px !global;
}