Skip to content

Commit

Permalink
Fluent Form: prevent editors "jumping" in one column mode (#26095)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Bulychev <[email protected]>
  • Loading branch information
iBat and Alexander Bulychev authored Nov 27, 2023
1 parent aaa0aa8 commit 62764ed
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
4 changes: 0 additions & 4 deletions packages/devextreme/scss/widgets/base/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
.dx-form-group .dx-single-column-item-content > .dx-first-row.dx-col-0.dx-field-item {
padding-top: 0;
}

.dx-box-item:not(:first-child) .dx-single-column-item-content > .dx-field-item {
padding-top: 10px;
}
}

.dx-label-h-align {
Expand Down
6 changes: 6 additions & 0 deletions packages/devextreme/scss/widgets/generic/form/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
.dx-field-item:not(.dx-last-col) {
padding-inline-end: 15px;
}

&.dx-layout-manager-one-col {
.dx-box-item:not(:first-child) .dx-single-column-item-content > .dx-field-item {
padding-top: $generic-form-default-padding;
}
}
}

.dx-form-group-caption {
Expand Down
1 change: 1 addition & 0 deletions packages/devextreme/scss/widgets/generic/form/_sizes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $generic-form-group-caption-font-size: null !default;
$generic-form-group-content-padding-bottom: null !default;
$generic-form-label-icon-size: null !default;
$generic-form-top-label-bottom-margin: null !default;
$generic-form-default-padding: 10px !default;

@if $size == "default" {
$generic-form-group-caption-font-size: 20px !default;
Expand Down
15 changes: 11 additions & 4 deletions packages/devextreme/scss/widgets/material/form/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
> .dx-scrollable-wrapper {
> .dx-scrollable-container {
margin-left: -10px;
padding-left: 10px;
padding-left: $material-form-default-padding;
}
}
}
Expand All @@ -48,10 +48,9 @@
padding-inline-start: 20px;
}

padding-bottom: 10px;
padding-bottom: $material-form-default-padding;
font-size: $material-form-label-font-size;


.dx-field-item {
&.dx-last-row {
padding-bottom: 0;
Expand All @@ -63,7 +62,15 @@
.dx-form > .dx-layout-manager.dx-layout-manager-one-col {
.dx-field-item {
.dx-field-item.dx-last-row:not(.dx-last-col) {
padding-bottom: 10px;
padding-bottom: $material-form-default-padding;
}

.dx-form-group .dx-single-column-item-content > .dx-first-row.dx-col-0.dx-field-item {
padding-top: 0;
}

.dx-box-item:not(:first-child) .dx-single-column-item-content > .dx-field-item {
padding-top: $material-form-default-padding;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/devextreme/scss/widgets/material/form/_sizes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $material-form-default-top-padding: null !default;

$material-form-label-font-size: null !default;
$material-form-label-icon-size: 14px !default;
$material-form-default-padding: 10px !default;

@if $size == "default" {
$material-form-label-font-size: 14px !default;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 62764ed

Please sign in to comment.