Skip to content

Commit 5594420

Browse files
authored
fix(ui5-calendar-legend): align selected item representation to new VD spec (#11391)
We have new design specification, about the representation of the Selected day default item of the ui5-calendar-legend component. Now in SAP Horizon and SAP Horizon Dark themes, the Selected Day item of the ui5-calendar-legend has a dot in the middle, which makes its concept more clear. Before 2025-04-23_13-43-56 After 2025-04-23_13-49-25
1 parent 1f4aa92 commit 5594420

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

packages/main/src/themes/CalendarLegendItem.css

+14-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,20 @@
4242

4343
:host([type="Selected"]) .ui5-calendar-legend-item-box {
4444
background: var(--sapContent_Selected_Background);
45-
border: 0.0625rem solid var(--sapContent_FocusColor);
45+
border: 0.0625rem solid var(--sapList_SelectionBorderColor);
46+
}
47+
48+
/* Dot in the middle of the box */
49+
:host([type="Selected"]) .ui5-calendar-legend-item-box::after {
50+
content: "";
51+
display: var(--_ui5-calendar-legend-item-box-dot-display); /* Dot should be visible only in sap_horizon and sap_horizon_dark themes */
52+
width: 0.25rem;
53+
height: 0.25rem;
54+
background: var(--sapContent_Selected_TextColor);
55+
border-radius: 50%;
56+
position: relative;
57+
inset-block-start: 0.3125rem;
58+
inset-inline-end: -0.3125rem;
4659
}
4760

4861
:host([type="NonWorking"]) .ui5-calendar-legend-item-box {

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

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
--_ui5-calendar-legend-item-root-focus-border: var(--sapContent_FocusWidth) dotted var(--sapContent_FocusColor);
55
--_ui5-calendar-legend-item-root-focus-border-radius: 0;
66
--_ui5-calendar-legend-item-root-width: 7.75rem;
7+
--_ui5-calendar-legend-item-box-dot-display: none;
78
}

packages/main/src/themes/sap_horizon/CalendarLegendItem-parameters.css

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
:root {
44
--_ui5-calendar-legend-item-root-focus-border: var(--sapContent_FocusWidth) solid var(--sapContent_FocusColor);
55
--_ui5-calendar-legend-item-root-focus-border-radius: 0.125rem;
6+
--_ui5-calendar-legend-item-box-dot-display: block;
67
}

packages/main/src/themes/sap_horizon_dark/CalendarLegendItem-parameters.css

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
:root {
44
--_ui5-calendar-legend-item-root-focus-border: var(--sapContent_FocusWidth) solid var(--sapContent_FocusColor);
55
--_ui5-calendar-legend-item-root-focus-border-radius: 0.125rem;
6+
--_ui5-calendar-legend-item-box-dot-display: block;
67
}

0 commit comments

Comments
 (0)