calendar.css.scss 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. $pixels-per-minute: 1px;
  2. $date-label-height: 20px;
  3. .week-nav {
  4. display: block;
  5. margin: 0px 0px 12px 0px;
  6. & > * {
  7. display: inline-block;
  8. }
  9. span {
  10. position: relative;
  11. top: 3px;
  12. margin-left: 6px;
  13. font-size: 1.3em;
  14. }
  15. .week-incrementer {
  16. padding: 1px 10px 3px 10px;
  17. font-size: 1.2em;
  18. font-weight: bold;
  19. }
  20. }
  21. .week {
  22. font-size: 0px; // Fix to remove width of single space character from between .day elements
  23. & > * {
  24. font-size: 1.3rem; // Restore font-size of immediate child (.day) elements
  25. }
  26. }
  27. fieldset.event-calendar {
  28. min-width: 850px;
  29. }
  30. .calendar-wrapper {
  31. margin-top: 30px;
  32. // margin-bottom: 90px;
  33. .date-label {
  34. position: absolute;
  35. width: 100%;
  36. top: -$date-label-height;
  37. height: $date-label-height;
  38. font-size: 1em;
  39. color: #333;
  40. text-align: center;
  41. }
  42. .calendar {
  43. position: relative;
  44. width: 100%;
  45. box-sizing: border-box;
  46. margin: $date-label-height, 0px, 0px, 0px;
  47. padding: 0px;
  48. text-align: left;
  49. overflow: visible;
  50. .day {
  51. position: relative;
  52. display: inline-block;
  53. height: $pixels-per-minute * 24 * 60;
  54. width: 12.75%; // 100% / 7, reduced a bit to give "wiggle" room w/o pushing last day to next "row"
  55. box-sizing: content-box;
  56. margin: 0px 0px;
  57. padding: 0px 0px 0px 0px;
  58. border-right: 1px solid #eee;
  59. text-align: left;
  60. // overflow-x: hidden;
  61. // overflow-y: hidden;
  62. // background-color: rgba(255, 255, 255, .75);
  63. transition: all .5s ease;
  64. &.today {
  65. background-color: rgba(#ddd, .2);
  66. .date-label {
  67. font-weight: bold;
  68. }
  69. }
  70. &.weekday {
  71. // width: 15%
  72. }
  73. &.weekend_day {
  74. // width: 7%;
  75. }
  76. &:first-child {
  77. margin-left: 3em;
  78. border-left: 1px solid #eee;
  79. }
  80. }
  81. .hour-grid {
  82. position: absolute;
  83. width: 100%;
  84. background-color: #fff;
  85. border: 1px solid #ddd;
  86. border-top: none;
  87. .current-time-line {
  88. position: absolute;
  89. top: 200px;
  90. width: 100%;
  91. height: 3px;
  92. border-top: 1px solid lighten($brand-danger, 25%);
  93. }
  94. .hour {
  95. position: relative;
  96. height: $pixels-per-minute * 60;
  97. text-align: left;
  98. color: #aaa;
  99. border-top: 1px solid #ededed;
  100. .hour-label {
  101. width: 3em;
  102. margin: 0px;
  103. padding: 1px 0px;
  104. font-size: .9em;
  105. color: #333;
  106. background-color: #fff;
  107. text-align: right;
  108. }
  109. .half-hour {
  110. position: absolute;
  111. bottom: 0px;
  112. display: block;
  113. width: 100%;
  114. height: $pixels-per-minute * 30;
  115. border-top: 1px dashed #eee;
  116. }
  117. }
  118. }
  119. }
  120. }
  121. .calendar-event {
  122. position: absolute;
  123. display: block;
  124. width: 100%;
  125. margin: 0px 0px 0px 0px;
  126. padding: 5%;
  127. background-color: $brand-primary;
  128. border: 1px solid #fff;
  129. box-shadow: 1px 1px 4px rgba(0, 0, 0, .5);
  130. .event-data {
  131. background-color: #f2f2f2;
  132. border: 1px solid #ddd;
  133. border-top: 2px solid rgba(0, 0, 0, .3);
  134. padding: 2.5%;
  135. a.link-to-object {
  136. float: right;
  137. display: block;
  138. margin: -2px 0px 0px 0px;
  139. img {
  140. width: 14px;
  141. height: 14px;
  142. text-decoration: none;
  143. }
  144. }
  145. .market-context {
  146. // Styles necessary to achieve ellipsis for long strings overrunning their parent's width
  147. white-space: nowrap;
  148. overflow: hidden;
  149. text-overflow: ellipsis;
  150. }
  151. .status {
  152. display: block;
  153. width: 100%;
  154. margin: 0px;
  155. }
  156. }
  157. & > * {
  158. // display: none;
  159. }
  160. &.trimmed_to_fit_beginning {
  161. // border-top: none;
  162. }
  163. &.trimmed_to_fit_end {
  164. // border-bottom: none;
  165. }
  166. }