55@import " ./base.less" ;
66@import " ./global.less" ;
77
8+ @_ui5_calendar_header_arrow_button_border : none ;
9+ @_ui5_calendar_header_arrow_button_border_radius : 0.25rem ;
10+
11+ @_ui5_calendar_header_middle_button_width : 2.5rem ;
12+ @_ui5_calendar_header_middle_button_flex : 1 ;
13+ @_ui5_calendar_header_middle_button_focus_border_radius : 0.25rem ;
14+ @_ui5_calendar_header_middle_button_focus_border : none ;
15+ @_ui5_calendar_header_middle_button_focus_after_display : block ;
16+ @_ui5_calendar_header_middle_button_focus_after_width : calc (~ " 100% - 0.25rem" );
17+ @_ui5_calendar_header_middle_button_focus_after_height : calc (~ " 100% - 0.25rem" );
18+ @_ui5_calendar_header_middle_button_focus_after_top_offset : 1px ;
19+ @_ui5_calendar_header_middle_button_focus_after_left_offset : 1px ;
20+
821:host (ui5- calendar- header) {
922 display : inline-block ;
1023 width : 100% ;
1124}
1225
13- // required for browsers without native shadow dom
1426ui5- calendar- header {
1527 display : inline-block ;
1628 width : 100% ;
@@ -21,10 +33,10 @@ ui5-calendar-header {
2133 height : 3rem ;
2234 padding : 0.25rem 0 ;
2335 box-sizing : border-box ;
36+ }
2437
25- & ui5- button {
26- height : 100% ;
27- }
38+ .sapWCCalHead ui5- button {
39+ height : 100% ;
2840}
2941
3042.sapWCCalHeadArrowButton {
@@ -33,89 +45,87 @@ ui5-calendar-header {
3345 align-items : center ;
3446 width : 2.5rem ;
3547 background-color : @sapUiButtonLiteBackground ;
36- border : none ;
3748 color : @sapUiButtonTextColor ;
3849 cursor : pointer ;
3950 overflow : hidden ;
4051 white-space : nowrap ;
4152 padding : 0 ;
4253 font-size : @sapMFontMediumSize ;
54+ }
4355
44- & :focus {
45- outline : none ;
46- }
56+ .sapWCCalHeadArrowButton :focus {
57+ outline : none ;
58+ }
4759
48- & :hover {
49- background-color : @sapUiButtonHoverBackground ;
50- color : @sapUiButtonHoverTextColor ;
51- }
60+ .sapWCCalHeadArrowButton :hover {
61+ background-color : @sapUiButtonHoverBackground ;
62+ color : @sapUiButtonHoverTextColor ;
63+ }
5264
53- & :active {
54- background-color : @sapUiButtonActiveBackground ;
55- color : @sapUiButtonActiveTextColor ;
56- }
65+ .sapWCCalHeadArrowButton :active {
66+ background-color : @sapUiButtonActiveBackground ;
67+ color : @sapUiButtonActiveTextColor ;
5768}
5869
5970.sapWCCalHeadArrowButton ,
6071.sapWCCalHeadMiddleButton {
61- border-radius : 0.25rem ;
72+ border : @_ui5_calendar_header_arrow_button_border ;
73+ border-radius : @_ui5_calendar_header_arrow_button_border_radius ;
6274}
6375
6476.sapWCCalHeadMidButtonContainer {
6577 display : flex ;
6678 justify-content : space-around ;
6779 flex : 1 ;
6880 padding : 0 0.5rem ;
81+ }
6982
70- & .sapWCCalHeadMiddleButton :first-child {
71- margin-right : 0.5rem ;
72- }
83+ .sapWCCalHeadMidButtonContainer .sapWCCalHeadMiddleButton :first-child {
84+ margin-right : 0.5rem ;
7385}
7486
7587.sapWCCalHeadMiddleButton {
7688 font-family : @sapUiFontFamily ;
77- flex : 1 ;
89+ width : @_ui5_calendar_header_middle_button_width ;
90+ flex : @_ui5_calendar_header_middle_button_flex ;
7891 position : relative ;
7992 box-sizing : border-box ;
8093 -webkit-user-select : none ;
8194 -moz-user-select : none ;
8295 -ms-user-select : none ;
8396 user-select : none ;
97+ }
98+
99+ .sapWCCalHeadMiddleButton :focus {
100+ border : @_ui5_calendar_header_middle_button_focus_border ;
101+ border-radius : @_ui5_calendar_header_middle_button_focus_border_radius ;
102+ }
103+
104+ .sapWCCalHeadMiddleButton :focus ::after {
105+ content : " " ;
106+ display : @_ui5_calendar_header_middle_button_focus_after_display ;
107+ width : @_ui5_calendar_header_middle_button_focus_after_width ;
108+ height : @_ui5_calendar_header_middle_button_focus_after_height ;
109+ border : 1px dotted @sapUiContentFocusColor ;
110+ position : absolute ;
111+ top : @_ui5_calendar_header_middle_button_focus_after_top_offset ;
112+ left : @_ui5_calendar_header_middle_button_focus_after_left_offset ;
113+ }
114+
115+ .sapWCCalHeadMiddleButton :focus:active ::after {
116+ border-color : @sapUiContentContrastFocusColor ;
117+ }
118+
119+ .sapUiSizeCompact .sapWCCalHead {
120+ height : 2rem ;
121+ padding : 0 ;
122+ }
123+
124+ .sapUiSizeCompact .sapWCCalHeadArrowButton {
125+ width : 2rem ;
126+ }
84127
85- & :focus {
86- & ::after {
87- content : " " ;
88- width : calc (~ " 100% - 0.25rem" );
89- height : calc (~ " 100% - 0.25rem" );
90- border : 1px dotted @sapUiContentFocusColor ;
91- position : absolute ;
92- top : 1px ;
93- left : 1px ;
94- }
95- }
96-
97- & :focus:active {
98- & ::after {
99- border-color : @sapUiContentContrastFocusColor ;
100- }
101- }
102- }
103-
104- .sapUiSizeCompact {
105-
106- & .sapWCCalHead {
107- height : 2rem ;
108- padding : 0 ;
109- }
110-
111- & .sapWCCalHeadArrowButton {
112- width : 2rem ;
113- }
114- }
115-
116- [dir= rtl ] {
117- .sapWCCalHeadMidButtonContainer .sapWCCalHeadMiddleButton :first-child {
118- margin-left : 0.5rem ;
119- margin-right : 0 ;
120- }
128+ [dir= rtl ] .sapWCCalHeadMidButtonContainer .sapWCCalHeadMiddleButton :first-child {
129+ margin-left : 0.5rem ;
130+ margin-right : 0 ;
121131}
0 commit comments