-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core):
Calendar
fix visual gaps in range (#8961)
Co-authored-by: taiga-family-bot <[email protected]>
- Loading branch information
1 parent
38f0e59
commit 8ec81aa
Showing
28 changed files
with
359 additions
and
448 deletions.
There are no files selected for viewing
137 changes: 45 additions & 92 deletions
137
projects/addon-mobile/components/mobile-calendar-sheet/mobile-calendar-sheet.style.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,131 +1,84 @@ | ||
@import '@taiga-ui/core/styles/taiga-ui-local'; | ||
|
||
@itemSize: 2.75rem; | ||
@accent: var(--tui-text-action); | ||
@faded: var(--tui-background-base-alt); | ||
|
||
.picker(@itemSize); | ||
.date-picker(); | ||
|
||
:host { | ||
display: block; | ||
inline-size: 20.75rem; | ||
// TODO: investigate problem in mobile calendar | ||
/* stylelint-disable-next-line */ | ||
max-inline-size: 100vw; | ||
|
||
&._ios { | ||
inline-size: 22.625rem; | ||
|
||
.t-row { | ||
block-size: 3.125rem; | ||
font-size: 1.0625rem; | ||
} | ||
|
||
.t-cell[data-range='start'], | ||
.t-cell[data-range='end'], | ||
.t-cell[data-range='active'] { | ||
font-weight: 600; | ||
} | ||
} | ||
} | ||
|
||
.t-row { | ||
block-size: 3rem; | ||
justify-content: flex-start; | ||
justify-content: space-between !important; | ||
font-family: inherit; | ||
font-size: 1.125rem; | ||
padding: 0.125rem; | ||
box-sizing: border-box; | ||
|
||
&:first-child { | ||
justify-content: flex-end; | ||
&:first-child .t-cell:not(.t-cell_empty) ~ .t-cell_empty, | ||
&:last-child .t-cell_empty { | ||
display: none; | ||
} | ||
|
||
:host._ios & { | ||
block-size: 3.125rem; | ||
&:last-child .t-cell:not(.t-cell_empty) ~ .t-cell_empty { | ||
display: flex; | ||
} | ||
} | ||
|
||
.t-cell { | ||
block-size: @itemSize; | ||
inline-size: 2.5rem; | ||
block-size: 2.5rem; | ||
border-radius: 100%; | ||
overflow: hidden; | ||
margin-right: 0.25rem; | ||
|
||
&:last-child, | ||
:host._ios &:last-child { | ||
margin-right: 0; | ||
} | ||
mask: none; | ||
border: none; | ||
text-decoration: none; | ||
|
||
&::before { | ||
// TODO: investigate problem in mobile calendar | ||
/* stylelint-disable-next-line */ | ||
right: -100vw; | ||
&_empty { | ||
visibility: hidden; | ||
} | ||
|
||
&:first-child::before { | ||
// TODO: investigate problem in mobile calendar | ||
/* stylelint-disable-next-line */ | ||
left: -100vw; | ||
} | ||
|
||
&_today::after { | ||
block-size: 0.375rem; | ||
inline-size: 0.375rem; | ||
background-color: @accent; | ||
} | ||
|
||
&_interval { | ||
&::before { | ||
background-color: @faded; | ||
&_today { | ||
&::after { | ||
content: '•'; | ||
text-align: center; | ||
line-height: 4rem; | ||
font-size: 1.5rem; | ||
color: var(--tui-text-action); | ||
} | ||
|
||
&:last-child:first-child::before { | ||
// TODO: investigate problem in mobile calendar | ||
/* stylelint-disable-next-line */ | ||
right: -100vw; | ||
&[data-range='start']::after, | ||
&[data-range='end']::after, | ||
&[data-range='active']::after { | ||
color: inherit; | ||
} | ||
} | ||
|
||
&_disabled { | ||
opacity: var(--tui-disabled-opacity); | ||
} | ||
|
||
&[data-range='single'], | ||
&[data-range='start'], | ||
&[data-range='end'] { | ||
border-radius: 100%; | ||
background-color: @accent; | ||
color: var(--tui-text-primary-on-accent-2); | ||
&[data-range='end'], | ||
&[data-range='active'] { | ||
font-weight: 500; | ||
|
||
&::after { | ||
background-color: var(--tui-background-base); | ||
} | ||
|
||
:host._ios & { | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
&[data-range='start']::before { | ||
left: 50%; | ||
border-top-left-radius: 0; | ||
border-bottom-left-radius: 0; | ||
} | ||
|
||
&[data-range='end']:not(:first-child)::before { | ||
left: 50%; | ||
background: var(--tui-background-base); | ||
border-radius: 0; | ||
} | ||
|
||
&[data-range='end']:first-child::before { | ||
right: 50%; | ||
background-color: @faded; | ||
} | ||
|
||
:host._ios & { | ||
margin-right: 0.5625rem; | ||
|
||
&::before { | ||
border-radius: 0.5rem; | ||
} | ||
} | ||
} | ||
|
||
@media screen and (max-width: 22.4375rem) { | ||
.t-cell, | ||
:host._ios .t-cell { | ||
margin-right: 0.125rem; | ||
} | ||
|
||
.t-cell:last-child, | ||
:host._ios .t-cell:last-child { | ||
margin-right: 0; | ||
&::after { | ||
mask: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.