|
5 | 5 | */ |
6 | 6 | @media lumo_components_date-picker-overlay-content { |
7 | 7 | :host { |
8 | | - display: grid; |
9 | | - grid-template-areas: |
10 | | - 'header header' |
11 | | - 'months years' |
12 | | - 'toolbar years'; |
13 | | - grid-template-columns: minmax(0, 1fr) 0; |
14 | | - height: 100%; |
15 | | - outline: none; |
16 | | - position: relative; |
17 | 8 | /* Background for the year scroller, placed here as we are using a mask image on the actual years part */ |
18 | 9 | background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct)); |
19 | 10 | background-size: 57px 100%; |
|
26 | 17 | background-position: top left; |
27 | 18 | } |
28 | 19 |
|
29 | | - :host([desktop]) { |
30 | | - grid-template-columns: minmax(0, 1fr) auto; |
31 | | - } |
32 | | - |
33 | | - :host([fullscreen][years-visible]) { |
34 | | - grid-template-columns: minmax(0, 1fr) auto; |
35 | | - } |
36 | | - |
37 | | - [hidden] { |
38 | | - display: none !important; |
39 | | - } |
40 | | - |
41 | 20 | ::slotted([slot='months']) { |
42 | 21 | /* Month calendar height: |
43 | 22 | header height + margin-bottom |
|
55 | 34 | ); |
56 | 35 | --vaadin-infinite-scroller-buffer-offset: 10%; |
57 | 36 | mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent); |
58 | | - position: relative; |
59 | 37 | } |
60 | 38 |
|
61 | 39 | ::slotted([slot='years']) { |
62 | 40 | /* TODO get rid of fixed magic number */ |
63 | 41 | --vaadin-infinite-scroller-buffer-width: 57px; |
64 | 42 | width: 57px; |
65 | | - height: auto; |
66 | | - top: 0; |
67 | | - bottom: 0; |
68 | 43 | font-size: var(--lumo-font-size-s); |
| 44 | + border: none; |
| 45 | + background: transparent; |
69 | 46 | box-shadow: inset 2px 0 4px 0 var(--lumo-shade-5pct); |
70 | 47 | mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); |
71 | 48 | cursor: var(--lumo-clickable-cursor); |
|
79 | 56 | --_lumo-date-picker-year-opacity: 1; |
80 | 57 | } |
81 | 58 |
|
82 | | - :host([desktop]) ::slotted([slot='years']), |
83 | | - :host([years-visible]) ::slotted([slot='years']) { |
84 | | - visibility: visible; |
85 | | - } |
86 | | - |
87 | 59 | /* Year scroller position indicator */ |
88 | 60 | ::slotted([slot='years'])::before { |
89 | 61 | border: none; |
90 | 62 | width: 1em; |
91 | 63 | height: 1em; |
92 | 64 | background-color: var(--lumo-base-color); |
93 | 65 | background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct)); |
94 | | - transform: translate(-75%, -50%) rotate(45deg); |
95 | 66 | border-top-right-radius: var(--lumo-border-radius-s); |
96 | 67 | box-shadow: 2px -2px 6px 0 var(--lumo-shade-5pct); |
97 | | - z-index: 1; |
| 68 | + translate: -75% -50%; |
98 | 69 | } |
99 | 70 |
|
100 | 71 | :host([dir='rtl']) ::slotted([slot='years'])::before { |
101 | | - right: 0; |
102 | | - transform: translate(75%, -50%) rotate(45deg); |
| 72 | + border-bottom-left-radius: var(--lumo-border-radius-s); |
| 73 | + translate: 75% -50%; |
103 | 74 | } |
104 | 75 |
|
105 | 76 | [part='toolbar'] { |
106 | | - display: flex; |
107 | | - grid-area: toolbar; |
108 | | - justify-content: space-between; |
109 | 77 | padding: var(--lumo-space-s); |
110 | 78 | border-bottom-left-radius: var(--lumo-border-radius-l); |
111 | 79 | } |
112 | 80 |
|
113 | 81 | /* Narrow viewport mode (fullscreen) */ |
114 | 82 |
|
115 | 83 | :host([fullscreen]) [part='toolbar'] { |
116 | | - grid-area: header; |
117 | 84 | margin-inline-end: 57px; |
118 | 85 | background-color: var(--lumo-base-color); |
| 86 | + border: none; |
119 | 87 | } |
120 | 88 |
|
121 | 89 | [part='toolbar'] ::slotted(vaadin-button) { |
|
125 | 93 | /* Very narrow screen (year scroller initially hidden) */ |
126 | 94 |
|
127 | 95 | [part='years-toggle-button'] { |
128 | | - display: flex; |
129 | | - align-items: center; |
130 | 96 | height: var(--lumo-size-m); |
131 | 97 | padding: 0 0.5em; |
132 | 98 | border-radius: var(--lumo-border-radius-m); |
|
0 commit comments