Skip to content

Commit

Permalink
style: 避免内容被撑开 (baidu#10208)
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed May 10, 2024
1 parent 5ec5d6b commit c9fa51e
Show file tree
Hide file tree
Showing 34 changed files with 140 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/amis-ui/scss/components/_alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

&-content {
flex: 1;
min-width: 0;

.#{$ns}Alert-title {
color: var(--alert-base-title-color);
Expand Down
3 changes: 3 additions & 0 deletions packages/amis-ui/scss/components/_calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@

.weekday {
flex: 1;
min-width: 0;
line-height: px2rem(30px);
text-align: center;
}
Expand All @@ -214,6 +215,8 @@

&-body {
flex: 1;
min-width: 0;
min-height: 0;
overflow-y: scroll;

table {
Expand Down
4 changes: 4 additions & 0 deletions packages/amis-ui/scss/components/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@

&-actions-wrapper {
flex: 1;
min-width: 0;
min-height: 0;
display: flex;
align-items: center;
justify-content: flex-end;
Expand Down Expand Up @@ -338,6 +340,8 @@
}
&-multiMedia-flex {
flex: 1;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
justify-content: center;
Expand Down
6 changes: 6 additions & 0 deletions packages/amis-ui/scss/components/_cascader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
}
.#{$ns}Cascader-tab {
flex: 1;
min-width: 0;
min-height: 0;
width: calc((100vw - 20px) / 3);
height: px2rem(260px);
overflow-y: auto;
Expand Down Expand Up @@ -77,6 +79,8 @@
}
&--text {
flex: 1;
min-width: 0;
min-height: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
Expand All @@ -89,6 +93,8 @@

&-arrow {
flex: 1;
min-width: 0;
min-height: 0;
text-align: right;
padding-right: px2rem(6px);
> svg {
Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/_city-area.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.#{$ns}CityArea {
flex: 1;
min-width: 0;
min-height: 0;
text-align: right;

&-popup {
Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/_condition-builder.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@
background: #e8e9eb;
display: block;
flex: 1;
min-width: 0;
min-height: 0;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/_crud.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
&.is-mobile {
.#{$ns}Crud-toolbar {
flex: 1;
min-width: 0;
min-height: 0;
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion packages/amis-ui/scss/components/_divider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
&--horizontal {
position: relative;
height: px2rem(2px);
border-bottom: var(--Divider-width) var(--Divider-style) var(--Divider-color);
border-bottom: var(--Divider-width) var(--Divider-style)
var(--Divider-color);
transform-origin: 0 center;
clear: both;
}
Expand All @@ -49,6 +50,8 @@
content: '';
height: 0;
flex: 1;
min-width: 0;
min-height: 0;
border-bottom: inherit;
border-bottom-width: var(--Divider-width);
}
Expand Down
14 changes: 14 additions & 0 deletions packages/amis-ui/scss/components/_formula.scss
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@

&-body {
flex: 1;
min-width: 0;
min-height: 0;
display: flex;
flex-flow: column nowrap;
max-height: calc(100% - 30px);
Expand Down Expand Up @@ -192,6 +194,8 @@
--Form-input-fontSize: var(--fontSizeSm);
--gap-sm: #{px2rem(10px)};
flex: 1;
min-width: 0;
min-height: 0;
max-height: 100%;
}

Expand All @@ -210,6 +214,8 @@

& > div {
flex: 1;
min-width: 0;
min-height: 0;
font-size: var(--fontSizeSm);
height: var(--gap-xl);
}
Expand Down Expand Up @@ -278,6 +284,8 @@
overflow-x: hidden;
overflow-y: auto;
flex: 1;
min-width: 0;
min-height: 0;
border-radius: var(--borderRadius);
}
}
Expand Down Expand Up @@ -366,6 +374,8 @@

& > div {
flex: 1;
min-width: 0;
min-height: 0;
font-size: var(--fontSizeSm);
height: var(--gap-xl);
}
Expand All @@ -374,6 +384,8 @@
&-body {
@include scrollbar();
flex: 1;
min-width: 0;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
}
Expand Down Expand Up @@ -455,6 +467,8 @@
overflow-x: hidden;
overflow-y: auto;
flex: 1;
min-width: 0;
min-height: 0;
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions packages/amis-ui/scss/components/_json-schema-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,14 @@
}

&-info {
min-width: 0;
min-height: 0;

@include input-input();
@include input-border();

flex: 1;

display: flex;
flex-direction: row;
justify-content: space-between;
Expand Down
6 changes: 6 additions & 0 deletions packages/amis-ui/scss/components/_json-schema.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
}

& > * {
min-width: 0;
min-height: 0;
flex: 1;
}

Expand All @@ -52,6 +54,8 @@
}

&-value {
min-width: 0;
min-height: 0;
flex: 1;
margin-left: auto;
display: flex;
Expand All @@ -62,6 +66,8 @@
}

> div {
min-width: 0;
min-height: 0;
flex: 1;
flex-wrap: nowrap;
}
Expand Down
6 changes: 6 additions & 0 deletions packages/amis-ui/scss/components/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
text-overflow: ellipsis;
color: inherit;
font-size: inherit;
min-width: 0;
min-height: 0;
flex: 1;
cursor: inherit;
font-weight: inherit;
Expand Down Expand Up @@ -290,6 +292,8 @@
position: static;
overflow: hidden;
display: flex;
min-width: 0;
min-height: 0;
flex: 1;
}
.#{$ns}Nav-Menu-item-wrap {
Expand Down Expand Up @@ -351,6 +355,8 @@
justify-content: space-between;

.#{$ns}Nav-Menu-item-wrap {
min-width: 0;
min-height: 0;
flex: 1;
overflow: hidden;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@
display: flex;

> .#{$ns}Button {
min-width: 0;
min-height: 0;
flex: 1;
height: px2rem(44px);

Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/_panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
padding: 0 var(--Panel-body-paddingLeft);

> .#{$ns}Button {
min-width: 0;
min-height: 0;
flex: 1;

&:first-child {
Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/_picker-columns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
position: relative;
background-color: var(--PickerColumns-bg);
user-select: none;
min-width: 0;
min-height: 0;
flex: 1;
overflow: hidden;
font-size: var(--PickerColumns-option-fontSize);
Expand Down
4 changes: 4 additions & 0 deletions packages/amis-ui/scss/components/_popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,13 @@
overflow-y: auto;
height: 100%;
display: flex;
min-width: 0;
min-height: 0;
flex: 1;

> div {
min-width: 0;
min-height: 0;
flex: 1;
}
}
Expand Down
6 changes: 6 additions & 0 deletions packages/amis-ui/scss/components/_steps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
padding: 0;

.#{$ns}StepsItem {
min-width: 0;
min-height: 0;
flex: 1;
overflow: hidden;
padding: 0 px2rem(8px);
Expand Down Expand Up @@ -198,6 +200,8 @@
list-style: none;
padding: 0;
.#{$ns}StepsItem {
min-width: 0;
min-height: 0;
flex: 1;
padding: 0;
overflow: visible;
Expand Down Expand Up @@ -441,6 +445,8 @@
}

&:last-child {
min-width: 0;
min-height: 0;
flex: 1;

.#{$ns}StepsItem-container {
Expand Down
4 changes: 4 additions & 0 deletions packages/amis-ui/scss/components/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@
border-bottom: none;

> .#{$ns}Tabs-linksContainer {
min-width: 0;
min-height: 0;
flex: 1;
align-items: stretch;

Expand Down Expand Up @@ -761,6 +763,8 @@
margin: 0;
border-radius: 0;
padding: 0;
min-width: 0;
min-height: 0;
flex: 1;
border: none;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/_timeline.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

.#{$ns}TimelineItem {
display: flex;
min-width: 0;
min-height: 0;
flex: 1;
flex-direction: row;

Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/_toast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
}

&-content {
min-width: 0;
min-height: 0;
flex: 1;
display: flex;
flex-flow: column nowrap;
Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/form/_combo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@
&.is-mobile {
.#{$ns}Form-item {
.#{$ns}Form-rowInner {
min-width: 0;
min-height: 0;
flex: 1;
}
}
Expand Down
6 changes: 6 additions & 0 deletions packages/amis-ui/scss/components/form/_date-range.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
outline: none;
padding: 0;
background: 0;
min-width: 0;
min-height: 0;
flex: 1;
width: 50%;
line-height: px2rem(30px);
Expand Down Expand Up @@ -188,6 +190,8 @@
padding: 0;

&.is-mobile {
min-width: 0;
min-height: 0;
flex: 1;

.#{$ns}DateRangePicker-end {
Expand All @@ -207,6 +211,8 @@
.#{$ns}DateRangePicker-start,
.#{$ns}DateRangePicker-end {
display: flex;
min-width: 0;
min-height: 0;
flex: 1;

.rdtPicker {
Expand Down
2 changes: 2 additions & 0 deletions packages/amis-ui/scss/components/form/_excel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
}

&-dropzone {
min-width: 0;
min-height: 0;
flex: 1;
display: flex;
flex-direction: column;
Expand Down
Loading

0 comments on commit c9fa51e

Please sign in to comment.