Skip to content

Commit 9de7198

Browse files
authored
fix(ui5-color-palette): Adapt components with responsive paddings (#4985)
Fixes: #4869
1 parent f5d56e2 commit 9de7198

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

packages/main/src/themes/ColorPalette.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
width: 18.5rem;
2525
max-width: 19.5rem;
2626
max-height: 13rem;
27+
padding: 0.375rem 0.625rem;
2728
}
2829

2930
.ui5-cp-recent-colors-wrapper {
@@ -43,6 +44,7 @@
4344
flex-flow: wrap;
4445
max-height: var(--_ui5_color-palette-row-height);
4546
overflow: hidden;
47+
padding: var(--_ui5_color-palette-swatch-container-padding);
4648
}
4749

4850
.ui5-cp-separator {

packages/main/src/themes/ColorPalettePopover.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@
1515
[ui5-responsive-popover]::part(content) {
1616
padding: 0;
1717
}
18+
19+
.ui5-cp-item-container {
20+
padding: 0.3125rem 0.6875rem;
21+
}

packages/main/src/themes/base/sizes-parameters.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
--_ui5_color-palette-item-hover-height: 2.375rem;
2424
--_ui5_color-palette-item-margin: calc((var(--_ui5_color-palette-item-hover-height) - var(--_ui5_color-palette-item-height)) / 2);
2525
--_ui5_color-palette-row-width: 12rem;
26+
--_ui5_color-palette-swatch-container-padding: 0.3125rem 0.6875rem;
2627

2728
/* DateTimePicker */
2829
--_ui5_datetime_picker_width: 40.0625rem;
@@ -166,6 +167,7 @@
166167
--_ui5_color-palette-item-hover-height: 1.625rem;
167168
--_ui5_color-palette-item-margin: calc((var(--_ui5_color-palette-item-hover-height) - var(--_ui5_color-palette-item-height)) / 2);
168169
--_ui5_color-palette-row-width: 8.125rem;
170+
--_ui5_color-palette-swatch-container-padding: 0.1875rem 0.8125rem;
169171
--_ui5_color-palette-item-hover-margin: 0;
170172
--_ui5_color-palette-row-height: 7.5rem;
171173
--_ui5_color-palette-button-height: 2rem;

0 commit comments

Comments
 (0)