VCalendar.sass 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. @use '../../styles/tools'
  2. @use './variables' as *
  3. @include tools.layer('components')
  4. .v-calendar
  5. @include tools.theme($calendar-theme...)
  6. .v-calendar-weekly
  7. width: 100%
  8. height: 100%
  9. display: flex
  10. flex-direction: column
  11. // https://github.com/vuetifyjs/vuetify/issues/8319
  12. min-height: 0
  13. .v-calendar__container
  14. border-top: $calendar-line-width solid $calendar-line-color
  15. border-left: $calendar-line-width solid $calendar-line-color
  16. border-right: $calendar-line-width solid $calendar-line-color
  17. .v-calendar-weekly__head
  18. display: grid
  19. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(7, 1fr)
  20. user-select: none
  21. &.days__0
  22. grid-template-columns: 1fr
  23. &.v-calendar-weekly__head-weeknumbers
  24. grid-template-columns: $calendar-weekly-weeknumber-flex-basis 1fr
  25. &.days__1
  26. grid-template-columns: 1fr
  27. &.v-calendar-weekly__head-weeknumbers
  28. grid-template-columns: $calendar-weekly-weeknumber-flex-basis 1fr
  29. &.days__2
  30. grid-template-columns: repeat(2, 1fr)
  31. &.v-calendar-weekly__head-weeknumbers
  32. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(2, 1fr)
  33. &.days__3
  34. grid-template-columns: repeat(3, 1fr)
  35. &.v-calendar-weekly__head-weeknumbers
  36. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(3, 1fr)
  37. &.days__4
  38. grid-template-columns: repeat(4, 1fr)
  39. &.v-calendar-weekly__head-weeknumbers
  40. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(4, 1fr)
  41. &.days__5
  42. grid-template-columns: repeat(5, 1fr)
  43. &.v-calendar-weekly__head-weeknumbers
  44. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(5, 1fr)
  45. &.days__6
  46. grid-template-columns: repeat(6, 1fr)
  47. &.v-calendar-weekly__head-weeknumbers
  48. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(6, 1fr)
  49. &.days__7
  50. grid-template-columns: repeat(7, 1fr)
  51. &.v-calendar-weekly__head-weeknumbers
  52. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(7, 1fr)
  53. .v-calendar-weekly__head-weekday, .v-calendar-weekly__head-weekday-with-weeknumber
  54. flex: 1 0 20px
  55. user-select: none
  56. padding: $calendar-weekly-weekday-padding
  57. font-size: $calendar-weekly-weekday-font-size
  58. overflow: hidden
  59. text-align: center
  60. text-overflow: ellipsis
  61. text-transform: uppercase
  62. white-space: nowrap
  63. // Themed
  64. border-right: $calendar-line-width solid $calendar-line-color
  65. &:last-child
  66. border-right: none
  67. // TODO change this
  68. > div .v-btn
  69. font-size: 1.5rem
  70. .v-calendar-weekly__head-weeknumber
  71. background: $calendar-weekly-weeknumber-background
  72. color: $calendar-weekly-weeknumber-color
  73. .v-calendar-weekly__week
  74. display: flex
  75. flex: 1
  76. height: unset
  77. // https://github.com/vuetifyjs/vuetify/issues/8319
  78. min-height: 0
  79. .v-calendar-month__weeknumber
  80. padding-top: $calendar-weekly-weeknumber-padding-top
  81. background: $calendar-month-weeknumber-background
  82. border-bottom: $calendar-line-width solid $calendar-line-color
  83. color: $calendar-month-weeknumber-color
  84. text-align: center
  85. font-size: $calendar-weekly-weeknumber-font-size
  86. font-weight: $calendar-weekly-weeknumber-font-weight
  87. .v-calendar-month__days
  88. display: grid
  89. flex: 1 1
  90. > .v-calendar-month__day
  91. min-height: $calendar-weekly-day-min-height
  92. &.days__0
  93. grid-template-columns: 1fr
  94. > .v-calendar-month__day
  95. border-right: none
  96. &.days__1
  97. grid-template-columns: 1fr
  98. > .v-calendar-month__day
  99. border-right: none
  100. &.days__2
  101. grid-template-columns: repeat(2, 1fr)
  102. > .v-calendar-month__day:nth-child(2n)
  103. border-right: none
  104. &.days__3
  105. grid-template-columns: repeat(3, 1fr)
  106. > .v-calendar-month__day:nth-child(3n)
  107. border-right: none
  108. &.days__4
  109. grid-template-columns: repeat(4, 1fr)
  110. > .v-calendar-month__day:nth-child(4n)
  111. border-right: none
  112. &.days__5
  113. grid-template-columns: repeat(5, 1fr)
  114. > .v-calendar-month__day:nth-child(5n)
  115. border-right: none
  116. &.days__6
  117. grid-template-columns: repeat(6, 1fr)
  118. > .v-calendar-month__day:nth-child(6n)
  119. border-right: none
  120. &.v-calendar-month__weeknumbers
  121. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(6, 1fr)
  122. &.days__7
  123. grid-template-columns: repeat(7, 1fr)
  124. > .v-calendar-month__day:nth-child(7n)
  125. border-right: none
  126. &.days-with-weeknumbers__0
  127. grid-template-columns: $calendar-weekly-weeknumber-flex-basis 1fr
  128. > .v-calendar-month__day
  129. border-right: none
  130. &.days-with-weeknumbers__1
  131. grid-template-columns: $calendar-weekly-weeknumber-flex-basis 1fr
  132. > .v-calendar-month__day
  133. border-right: none
  134. &.days-with-weeknumbers__2
  135. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(2, 1fr)
  136. > .v-calendar-month__day:nth-child(3n)
  137. border-right: none
  138. &.days-with-weeknumbers__3
  139. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(3, 1fr)
  140. > .v-calendar-month__day:nth-child(4n)
  141. border-right: none
  142. &.days-with-weeknumbers__4
  143. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(4, 1fr)
  144. > .v-calendar-month__day:nth-child(5n)
  145. border-right: none
  146. &.days-with-weeknumbers__5
  147. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(5, 1fr)
  148. > .v-calendar-month__day:nth-child(6n)
  149. border-right: none
  150. &.days-with-weeknumbers__6
  151. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(6, 1fr)
  152. > .v-calendar-month__day:nth-child(7n)
  153. border-right: none
  154. &.days-with-weeknumbers__7
  155. grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(7, 1fr)
  156. > .v-calendar-month__day:nth-child(7n)
  157. border-right: $calendar-line-width solid $calendar-line-width
  158. > .v-calendar-month__day:nth-child(8n)
  159. border-right: none
  160. > .v-calendar-month__day:nth-child(8n)
  161. border-right: none