Skip to content

Commit

Permalink
feat: 基础组件最外层元素 flex -> inline-flex
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-boide committed Sep 25, 2023
1 parent 9cd9bf3 commit e3c5002
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/nutui-taro-demo/project.private.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@
},
"projectname": "vue4.x",
"libVersion": "2.27.1"
}
}
6 changes: 0 additions & 6 deletions packages/nutui-taro-demo/src/dentry/pages/checkbox/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,7 @@ export default {
.demo-check {
margin-right: 10px;
}
.nut-checkbox-group {
display: flex;
flex-wrap: wrap;
}
.nut-checkbox {
display: flex;
margin-right: 20px;
.nut-checkbox__label {
margin-left: 10px;
}
Expand Down
8 changes: 0 additions & 8 deletions src/packages/__VUE/checkbox/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,7 @@ export default defineComponent({
margin-right: 10px;
}
.nut-checkbox-group {
display: flex;
flex-wrap: wrap;
}
.nut-checkbox {
display: flex;
margin-right: 20px;
.nut-checkbox__label {
margin-left: 10px;
}
Expand Down
2 changes: 2 additions & 0 deletions src/packages/__VUE/checkbox/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,5 @@ The component provides the following CSS variables, which can be used to customi
| --nut-checkbox-button-font-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-border-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-background-active | _var(--nut-primary-color)_ |
| --nut-checkbox-display | _inline-flex_ |
| --nut-checkbox-margin-right | _20px_ |
2 changes: 2 additions & 0 deletions src/packages/__VUE/checkbox/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,5 @@ app.use(CheckboxGroup);
| --nut-checkbox-button-font-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-border-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-background-active | _var(--nut-primary-color)_ |
| --nut-checkbox-display | _inline-flex_ |
| --nut-checkbox-margin-right | _20px_ |
2 changes: 2 additions & 0 deletions src/packages/__VUE/checkbox/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,3 +440,5 @@ app.use(CheckboxGroup);
| --nut-checkbox-button-font-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-border-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-background-active | _var(--nut-primary-color)_ |
| --nut-checkbox-display | _inline-flex_ |
| --nut-checkbox-margin-right | _20px_ |
3 changes: 2 additions & 1 deletion src/packages/__VUE/checkbox/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
}
}
.nut-checkbox {
display: flex;
display: $checkbox-display;
align-items: center;
margin-right: $checkbox-margin-right;
&--reverse {
flex-direction: row-reverse;
.nut-checkbox__label {
Expand Down
4 changes: 4 additions & 0 deletions src/packages/__VUE/checkboxgroup/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.nut-checkbox-group {
display: inline-flex;
flex-wrap: wrap;
}
2 changes: 1 addition & 1 deletion src/packages/__VUE/inputnumber/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,4 @@ The component provides the following CSS variables, which can be used to customi
| --nut-inputnumber-height | _auto_ |
| --nut-inputnumber-line-height | _normal_ |
| --nut-inputnumber-border-box | _content-box_ |
| --nut-inputnumber-display | _flex_ |
| --nut-inputnumber-display | _inline-flex_ |
2 changes: 1 addition & 1 deletion src/packages/__VUE/inputnumber/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,4 @@ app.use(InputNumber);
| --nut-inputnumber-height | _auto_ |
| --nut-inputnumber-line-height | _normal_ |
| --nut-inputnumber-border-box | _content-box_ |
| --nut-inputnumber-display | _flex_ |
| --nut-inputnumber-display | _inline-flex_ |
2 changes: 1 addition & 1 deletion src/packages/__VUE/inputnumber/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,4 @@ app.use(InputNumber);
| --nut-inputnumber-height | _auto_ |
| --nut-inputnumber-line-height | _normal_ |
| --nut-inputnumber-border-box | _content-box_ |
| --nut-inputnumber-display | _flex_ |
| --nut-inputnumber-display | _inline-flex_ |
4 changes: 3 additions & 1 deletion src/packages/styles/variables-jdb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ $inputnumber-border-radius: 0 !default;
$inputnumber-height: auto !default;
$inputnumber-line-height: normal !default;
$inputnumber-border-box: content-box !default;
$inputnumber-display: flex !default;
$inputnumber-display: inline-flex !default;

// actionsheet
$actionsheet-light-color: #f6f6f6 !default;
Expand Down Expand Up @@ -520,6 +520,8 @@ $checkbox-button-background: var(--nut-checkbox-button-background, #f6f7f9) !def
$checkbox-button-font-color-active: var(--nut-checkbox-button-font-color-active, $primary-color) !default;
$checkbox-button-border-color-active: var(--nut-checkbox-button-border-color-active, $primary-color) !default;
$checkbox-button-background-active: var(--nut-checkbox-button-background-active, $primary-color) !default;
$checkbox-display: var(--nut-checkbox-display, inline-flex) !default;
$checkbox-margin-right: var(--nut-checkbox-margin-right, 20px) !default;

//radio
$radio-label-font-color: #1d1e1e !default;
Expand Down
2 changes: 2 additions & 0 deletions src/packages/styles/variables-jddkh.scss
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ $checkbox-button-background: var(--nut-checkbox-button-background, #f6f7f9) !def
$checkbox-button-font-color-active: var(--nut-checkbox-button-font-color-active, $primary-color) !default;
$checkbox-button-border-color-active: var(--nut-checkbox-button-border-color-active, $primary-color) !default;
$checkbox-button-background-active: var(--nut-checkbox-button-background-active, $primary-color) !default;
$checkbox-display: var(--nut-checkbox-display, inline-flex) !default;
$checkbox-margin-right: var(--nut-checkbox-margin-right, 20px) !default;

//radio
$radio-label-font-color: #1d1e1e !default;
Expand Down
4 changes: 3 additions & 1 deletion src/packages/styles/variables-jdt.scss
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $inputnumber-border-radius: var(--nut-inputnumber-border-radius, 0) !default;
$inputnumber-height: var(--nut-inputnumber-height, auto) !default;
$inputnumber-line-height: var(--nut-inputnumber-line-height, normal) !default;
$inputnumber-border-box: var(--nut-inputnumber-border-box, content-box) !default;
$inputnumber-display: var(--nut-inputnumber-display, flex) !default;
$inputnumber-display: var(--nut-inputnumber-display, inline-flex) !default;

// actionsheet
$actionsheet-light-color: var(--nut-actionsheet-light-color, #f6f6f6) !default;
Expand Down Expand Up @@ -451,6 +451,8 @@ $checkbox-button-background: var(--nut-checkbox-button-background, #f6f7f9) !def
$checkbox-button-font-color-active: var(--nut-checkbox-button-font-color-active, $primary-color) !default;
$checkbox-button-border-color-active: var(--nut-checkbox-button-border-color-active, $primary-color) !default;
$checkbox-button-background-active: var(--nut-checkbox-button-background-active, $primary-color) !default;
$checkbox-display: var(--nut-checkbox-display, inline-flex) !default;
$checkbox-margin-right: var(--nut-checkbox-margin-right, 20px) !default;

//radio
$radio-label-font-color: var(--nut-radio-label-font-color, rgba(0, 0, 0, 0.85)) !default;
Expand Down
4 changes: 3 additions & 1 deletion src/packages/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ $inputnumber-border-radius: var(--nut-inputnumber-border-radius, 0) !default;
$inputnumber-height: var(--nut-inputnumber-height, auto) !default;
$inputnumber-line-height: var(--nut-inputnumber-line-height, normal) !default;
$inputnumber-border-box: var(--nut-inputnumber-border-box, content-box) !default;
$inputnumber-display: var(--nut-inputnumber-display, flex) !default;
$inputnumber-display: var(--nut-inputnumber-display, inline-flex) !default;

// actionsheet
$actionsheet-light-color: var(--nut-actionsheet-light-color, #f6f6f6) !default;
Expand Down Expand Up @@ -489,6 +489,8 @@ $checkbox-button-background: var(--nut-checkbox-button-background, #f6f7f9) !def
$checkbox-button-font-color-active: var(--nut-checkbox-button-font-color-active, $primary-color) !default;
$checkbox-button-border-color-active: var(--nut-checkbox-button-border-color-active, $primary-color) !default;
$checkbox-button-background-active: var(--nut-checkbox-button-background-active, $primary-color) !default;
$checkbox-display: var(--nut-checkbox-display, inline-flex) !default;
$checkbox-margin-right: var(--nut-checkbox-margin-right, 20px) !default;

//radio
$radio-label-font-color: var(--nut-radio-label-font-color, #1d1e1e) !default;
Expand Down

0 comments on commit e3c5002

Please sign in to comment.