-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vwc-calendar): cells wrong grid columns (#862)
* fix(vwc-calendar): cells wrong grid columns * add lit-html dep * simplified naming
- Loading branch information
Showing
8 changed files
with
141 additions
and
53 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// snap fraction within an hour | ||
$fraction: 4; | ||
// number of columns according to days of week | ||
$total-columns: 7; | ||
// the rows according to hours a day | ||
$total-rows: 24; | ||
|
||
|
||
// event variables | ||
$color: --vvd-calendar-event--primary-color; | ||
$day: --vvd-calendar-event--day; | ||
$start: --vvd-calendar-event--start; | ||
$duration: --vvd-calendar-event--duration; | ||
$indent: --vvd-calendar-event--indent; | ||
$overlap-count: --vvd-calendar-event--overlap-count; |
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,22 +1,37 @@ | ||
$indent: --vvd-calendar-event-indent; | ||
$overlap-count: --vvd-calendar-event-overlap-count; | ||
$event-color: --vvd-calendar-event-event-color; | ||
$event-day: --vvd-calendar-event-event-day; | ||
$event-row: --vvd-calendar-event-event-row; | ||
@use '@vonage/vvd-typography/scss/typography'; | ||
@use '@vonage/vvd-design-tokens/build/scss/semantic-variables/scheme-variables'; | ||
@use 'vwc-calendar-variables' as calendar-variables; | ||
|
||
:host { | ||
display: contents; | ||
} | ||
|
||
section { | ||
#{$indent}: calc(var(#{$overlap-count}, 0) * 8px); | ||
z-index: var(#{$overlap-count}); | ||
margin: 1px 1px 1px calc(1px + var(#{$indent})); | ||
background-color: var(#{$event-color}); | ||
border-radius: 3.64752px; | ||
grid-column: var(#{$event-day}); | ||
grid-row: var(#{$event-row}); | ||
#{calendar-variables.$indent}: calc(var(#{calendar-variables.$overlap-count}, 0) * 8px); | ||
z-index: var(#{calendar-variables.$overlap-count}); | ||
overflow: hidden; | ||
padding: 16px; | ||
margin: 1px 1px 1px calc(1px + var(#{calendar-variables.$indent})); | ||
background-color: var(#{calendar-variables.$color}, var(#{scheme-variables.$vvd-color-neutral-40})); | ||
border-radius: 6px; | ||
color: var(#{scheme-variables.$vvd-color-on-primary}); | ||
contain: strict; | ||
grid-column: var(#{calendar-variables.$day}); | ||
grid-row: var(#{calendar-variables.$start}) / span var(#{calendar-variables.$duration}); | ||
&:focus { | ||
z-index: 2000; | ||
} | ||
} | ||
|
||
h2 { | ||
@include typography.typography-cat-shorthand('body-2-bold'); | ||
margin: 0 0 4px; | ||
> strong { | ||
font: inherit; | ||
} | ||
} | ||
|
||
p { | ||
@include typography.typography-cat-shorthand('caption'); | ||
margin: 0; | ||
} |
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
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