|
157 | 157 | /// @param {List} $border-radius [null] - The border radius used for the calendar. |
158 | 158 | /// @param {List} $date-border-radius [null] - The border radius used for the date. |
159 | 159 | /// @param {List} $date-range-border-radius [null] - The border radius used for the date range selection. |
| 160 | +/// @param {List} $date-current-border-radius [null] - The border radius used for the current date . |
| 161 | +/// @param {List} $date-special-border-radius [null] - The border radius used for the special date. |
160 | 162 | /// @param {List} $ym-border-radius [null] - The border radius used for the month/year. |
161 | 163 | /// |
162 | 164 | /// @param {Color} $actions-divider-color [null] - The border color used for the date-picker actions divider. |
|
310 | 312 | $date-border-radius: null, |
311 | 313 | $week-number-border-radius: null, |
312 | 314 | $date-range-border-radius: null, |
| 315 | + $date-current-border-radius: null, |
| 316 | + $date-special-border-radius: null, |
313 | 317 | $ym-border-radius: null, |
314 | 318 |
|
315 | 319 | $actions-divider-color: null, |
|
330 | 334 | $theme: digest-schema($calendar-schema); |
331 | 335 | $variant: map.get($schema, '_meta', 'theme'); |
332 | 336 |
|
| 337 | + @if not($date-range-border-radius) and $date-border-radius { |
| 338 | + $date-range-border-radius: $date-border-radius; |
| 339 | + } |
| 340 | + |
| 341 | + @if not($date-border-radius) and $date-range-border-radius { |
| 342 | + $date-border-radius: $date-range-border-radius; |
| 343 | + } |
| 344 | + |
| 345 | + @if not($date-current-border-radius) and $date-border-radius { |
| 346 | + $date-current-border-radius: $date-border-radius; |
| 347 | + } |
| 348 | + |
| 349 | + @if not($date-special-border-radius) and $date-border-radius { |
| 350 | + $date-special-border-radius: $date-border-radius; |
| 351 | + } |
| 352 | + |
333 | 353 | //base start |
334 | 354 | @if not($header-foreground) and $header-background { |
335 | 355 | $header-foreground: adaptive-contrast(var(--header-background)); |
|
1031 | 1051 | border-radius: $border-radius, |
1032 | 1052 | date-border-radius: $date-border-radius, |
1033 | 1053 | date-range-border-radius: $date-range-border-radius, |
| 1054 | + date-current-border-radius: $date-current-border-radius, |
| 1055 | + date-special-border-radius: $date-special-border-radius, |
1034 | 1056 | ym-border-radius: $ym-border-radius, |
1035 | 1057 | week-number-border-radius: $week-number-border-radius, |
1036 | 1058 | date-border-color: $date-border-color, |
|
1827 | 1849 | position: absolute; |
1828 | 1850 | z-index: 0; |
1829 | 1851 | border: $border-size solid transparent; |
| 1852 | + border-radius: calc(var-get($theme, 'date-special-border-radius') - $border-size); |
1830 | 1853 |
|
1831 | 1854 | @if $variant == 'fluent' { |
1832 | | - border-radius: 50%; |
1833 | 1855 | width: $date-inner-size; |
1834 | 1856 | height: $date-inner-size; |
1835 | 1857 | } @else { |
1836 | | - border-radius: inherit; |
1837 | 1858 | // By default initial size of the inner element is the same as the date size |
1838 | 1859 | width: $date-size; |
1839 | 1860 | height: $date-size; |
|
1964 | 1985 | background: var-get($theme, 'date-special-range-hover-background'); |
1965 | 1986 |
|
1966 | 1987 | @if $variant == 'indigo' { |
| 1988 | + // stylelint-disable-next-line |
1967 | 1989 | &::after { |
1968 | 1990 | border-color: var-get($theme, 'date-special-hover-border-color'); |
1969 | 1991 | } |
|
2041 | 2063 | z-index: -1; |
2042 | 2064 | width: $date-inner-size; |
2043 | 2065 | height: $date-inner-size; |
2044 | | - border-radius: 50%; |
| 2066 | + border-radius: calc(var-get($theme, 'date-current-border-radius') - ($border-size * 2)); |
2045 | 2067 | background: var-get($theme, 'date-current-background'); |
2046 | 2068 | } |
| 2069 | + |
| 2070 | + &::after { |
| 2071 | + border-radius: calc(var-get($theme, 'date-current-border-radius') - $border-size); |
| 2072 | + } |
2047 | 2073 | } |
2048 | 2074 |
|
2049 | 2075 | @if $variant == 'indigo' { |
|
2089 | 2115 | &::after { |
2090 | 2116 | border-color: var-get($theme, 'date-special-border-color'); |
2091 | 2117 |
|
2092 | | - @if $variant == 'bootstrap' { |
2093 | | - border-radius: $date-size; |
| 2118 | + @if $variant == 'bootstrap' or $variant == 'fluent' { |
| 2119 | + border-radius: calc(var-get($theme, 'date-special-border-radius') - ($border-size * 2)); |
2094 | 2120 | } |
2095 | 2121 | } |
2096 | 2122 |
|
|
2232 | 2258 | } |
2233 | 2259 |
|
2234 | 2260 | &:hover { |
| 2261 | + // stylelint-disable-next-line |
2235 | 2262 | &::after { |
2236 | 2263 | border-color: var-get($theme, 'date-selected-special-hover-border-color'); |
2237 | 2264 | } |
|
2343 | 2370 | } |
2344 | 2371 |
|
2345 | 2372 | &:hover { |
| 2373 | + // stylelint-disable-next-line |
2346 | 2374 | &::after { |
2347 | 2375 | border-color: var-get($theme, 'date-current-hover-border-color'); |
2348 | 2376 | } |
|
0 commit comments