Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 各个组件移除全局 reset 样式依赖 #514

Merged
merged 9 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/global-config/locale/ko_KR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
thisMonth: '이번 달',
week: '하나,둘,셋,넷,다섯,여섯,하루',
cellMonth: '1월,2월,3월,4월,5월,6월,7월,8월,9월,10월,11월,12월',
},
},
transfer: {
title: '{checked} / {total} 안건',
empty: '데이터 없음',
Expand Down
4 changes: 4 additions & 0 deletions style/web/components/alert/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

/* Alert */
.@{prefix}-alert {
.reset;

display: flex;
padding: @alert-padding;
opacity: 1;
Expand Down
4 changes: 4 additions & 0 deletions style/web/components/anchor/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

.@{prefix}-anchor {
.reset;

position: relative;
background: @anchor-bg-color;
width: @anchor-width-default;
Expand Down
4 changes: 4 additions & 0 deletions style/web/components/avatar/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

.@{prefix}-avatar {
.reset;

position: relative;
display: inline-flex;
background: @avatar-bg-color;
Expand Down
4 changes: 4 additions & 0 deletions style/web/components/badge/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

// Badge
.@{prefix}-badge {
.reset;

position: relative;
display: inline-block;

Expand Down
3 changes: 3 additions & 0 deletions style/web/components/breadcrumb/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

.@{prefix}-breadcrumb {
.reset;
.breadcrumb;

&__separator {
Expand Down
3 changes: 3 additions & 0 deletions style/web/components/button/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

.button-attr-color(@theme, @attr, @ghost: false) {
&:hover {
@{attr}: @@theme-hover;
Expand All @@ -26,6 +28,7 @@
}

.@{prefix}-button {
.reset;
.button;

.@{prefix}-button__text,
Expand Down
5 changes: 5 additions & 0 deletions style/web/components/calendar/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

.@{prefix}-calendar {
.reset;

border: 1px solid @calendar-border-color;
background-color: @calendar-bg;

Expand Down Expand Up @@ -275,6 +279,7 @@
}

&__panel {
box-sizing: border-box;
width: 100%;
}

Expand Down
4 changes: 4 additions & 0 deletions style/web/components/card/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

.@{prefix}-card {
.reset;

position: relative;
box-sizing: border-box;
border-radius: @card-border-radius;
Expand Down
4 changes: 4 additions & 0 deletions style/web/components/cascader/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

@import "../../mixins/_text.less";

@import "../../mixins/_reset.less";

.@{prefix}-cascader {
.reset;

position: relative;
border: @cascader-border;
border-radius: @border-radius;
Expand Down
8 changes: 8 additions & 0 deletions style/web/components/checkbox/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@

@import "../../mixins/_layout.less";

@import "../../mixins/_reset.less";

// <name> 替换为组件名
.@{checkbox-cls}-group {
.reset;

display: inline-flex;
flex-wrap: wrap;
gap: @checkbox-group-gap;
}

.@{checkbox-cls} {
.reset;

display: inline-flex;
align-items: center;
position: relative;
Expand All @@ -39,11 +45,13 @@
border: 1px solid @checkbox-border-color;
border-radius: @checkbox-border-radius;
background-color: @checkbox-input-color;
box-sizing: border-box;

&::after {
content: "";
position: absolute;
opacity: 0;
box-sizing: border-box;
}
}

Expand Down
4 changes: 4 additions & 0 deletions style/web/components/collapse/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

.@{collapse-cls} {
.reset;

border: @collapse-border-size;
border-bottom: 0;
background: @bg-color-container;
Expand Down
8 changes: 8 additions & 0 deletions style/web/components/color-picker/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

.@{prefix}-color-picker__panel {
padding: 0;
width: @color-picker-panel-width;
Expand All @@ -26,6 +28,8 @@
}

.@{prefix}-color-picker {
.reset;

&__icon {
width: @color-picker-icon-size;
height: @color-picker-icon-size;
Expand Down Expand Up @@ -102,6 +106,7 @@
background: white;
color: @text-color-brand;
padding: @color-picker-slider-thumb-padding;
box-sizing: border-box;

&::before {
content: "";
Expand Down Expand Up @@ -448,6 +453,7 @@
position: relative;
transform-origin: center;
transition: all @anim-duration-base @anim-time-fn-easing;
box-sizing: border-box;

// 暂时先不删,待react同步后再删除
&__color {
Expand All @@ -457,6 +463,7 @@
overflow: hidden;
border: 1px solid @component-border;
border-radius: 50%;
flex-shrink: 0;
}

// 暂时先不删,待react同步后再删除
Expand Down Expand Up @@ -484,6 +491,7 @@
overflow: hidden;
border: 1px solid @component-border;
border-radius: 50%;
box-sizing: border-box;
}

&--inner {
Expand Down
6 changes: 6 additions & 0 deletions style/web/components/comment/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

@import "./_mixin.less";

@import "../../mixins/_reset.less";

.@{prefix}-comment {
.reset;

width: 100%;
color: @comment-text-color-default;

Expand Down Expand Up @@ -70,6 +74,8 @@
margin-top: @comment-actions-margin-top;
display: flex;
justify-content: flex-end;
list-style: none;
padding: 0;

& > li {
color: @comment-text-color-secondary;
Expand Down
Loading