You are here

availability_calendar.base.css in Availability Calendars 7.3

Same filename and directory in other branches
  1. 7.5 availability_calendar.base.css
  2. 7.4 availability_calendar.base.css
/*
 * Styling your calendar:
 * - This file contains some basic calendar styling.
 * - Visit admin/config/content/availability-calendar/styling to define some more styling.
 * - Finally resort to your theme style sheets to define any requested styling.
 *
 * A calendar is rendered as follows:
 * div#cal-{cid}.cal
 *   div.cal-viewport          ? optional when the viewport functionality is enabled
 *     div.cal-viewport-inner  ? optional
 *       div#cal-{cid}-{year}-{month}.cal-month  * repeated for each month
 *         table
 *           caption           contains month name
 *           thead
 *             tr
 *               th.cal-weekno-header  ? optional, if weeknotes are enabled, contains 'Nr.'
 *               th            * repeated 7 times, containing short names of the days
 *           tbody
 *             tr[.cal-empty]  * repeated 6 times, class cal-empty only if row does not contain day cells (can only be the last or last 2 rows)
 *               th            ? optional, only rendered if week notes are enabled, contains the week note
 *               td.{state}    * repeated 7 times, representing a day in the month, class defines state(s) of that day
 *                 div         ? optional only with no split days, contains day number
 *                 span        ? optional only with split days
 *                   span        contains day number
 *
 * The key is rendered as follows:
 * @todo
 */
.cal-month {
  float: left; /* LTR */
  margin: 0 6px 6px;
}

/* - Some themes set the width to 100% and browsers will honor that above the
 *   width of individual columns when using fixed table-layout.
 * - IE7 will always honor that, even without fixed table-layout.
 * So we use both and assure that each column gets its width in the first row.
 */
.cal table {
  table-layout: fixed;
  width: auto;
}

.cal table, .cal th, .cal td {
  margin: 0;
  padding: 0;
}

.cal caption {
  margin: 6px 6px 0;
  padding: 0;
  border-bottom: 1px solid #555;
}

/*
 * Settings to get day number and coloring according to state for split days.
 * - border-width will be defined in the generated css.
 * - border-color will be overruled based on the defined availability states.
 */
.cal td > span {
  display: block;
  position: relative; /* Allows to position inner span w.r.t this span. */
  border-style: solid;
  border-color: transparent;
}

.cal td > span > span {
  position: absolute;
  z-index: 1;
}

/* Allows to highlight a border on hovering (without disturbing the lay-out). */
.cal td > div, .cal td > span > span {
  border: 1px solid transparent;
}


/*
 * Special statuses:
 * cal-other: cells from another month (at the start of end of a calendar month).
 * cal-pastdate: cell for days in the past.
 * cal-today: cell for the current day.
 * cal-selectable: cells that are selectable.
 * cal-selected: cell that has been selected.
 * cal-empty: cell (with colspan=7) for an empty 6th week. 
 */

/* these selectors need to be stronger than those for the availability states. */
.cal th,
.cal .cal-other, .cal .cal-other > div, .cal .cal-other > span,
.cal .cal-pastdate, .cal .cal-pastdate div, .cal .cal-pastdate > span {
  background-color: transparent;
  border-color: transparent;
}

.cal td > span {
  border-color: transparent;
}

.cal-other {
  color: #aaa;
}

.cal-today {
  font-weight: bolder;
}

.cal-selected {
  font-weight: bolder;
  font-size: larger;
}

.cal .cal-selected > div, .cal .calselected > span > span {
  border-color: #555;
}

.cal-selectable {
  cursor: pointer;
}

/* Table cells and spans cannot get :focus, so no need to define that pseudo class. */
.cal-selectable:hover > div, .cal-selectable:hover > span > span {
  border-color: #555;
}

/*
 * Key
 */
.keystatus {
  padding-left: 2px; /* LTR */
}

.cal td.keystatus div {
  width: auto;
}

/*
 * View calendar through a viewport, also see availability_calendar.view.js.
 */
.cal-viewport {
  position: relative;
  overflow: hidden;
}

.cal-viewport-inner {
  position: relative;
  top: 0;
  left: 0; /* LTR */
  overflow: visible;
}

.cal-backward, .cal-forward {
  cursor: pointer;
}

.cal-backward[disabled], .cal-forward[disabled] {
  cursor: inherit;
  pointer-events: none;
}

File

availability_calendar.base.css
View source
  1. /*
  2. * Styling your calendar:
  3. * - This file contains some basic calendar styling.
  4. * - Visit admin/config/content/availability-calendar/styling to define some more styling.
  5. * - Finally resort to your theme style sheets to define any requested styling.
  6. *
  7. * A calendar is rendered as follows:
  8. * div#cal-{cid}.cal
  9. * div.cal-viewport ? optional when the viewport functionality is enabled
  10. * div.cal-viewport-inner ? optional
  11. * div#cal-{cid}-{year}-{month}.cal-month * repeated for each month
  12. * table
  13. * caption contains month name
  14. * thead
  15. * tr
  16. * th.cal-weekno-header ? optional, if weeknotes are enabled, contains 'Nr.'
  17. * th * repeated 7 times, containing short names of the days
  18. * tbody
  19. * tr[.cal-empty] * repeated 6 times, class cal-empty only if row does not contain day cells (can only be the last or last 2 rows)
  20. * th ? optional, only rendered if week notes are enabled, contains the week note
  21. * td.{state} * repeated 7 times, representing a day in the month, class defines state(s) of that day
  22. * div ? optional only with no split days, contains day number
  23. * span ? optional only with split days
  24. * span contains day number
  25. *
  26. * The key is rendered as follows:
  27. * @todo
  28. */
  29. .cal-month {
  30. float: left; /* LTR */
  31. margin: 0 6px 6px;
  32. }
  33. /* - Some themes set the width to 100% and browsers will honor that above the
  34. * width of individual columns when using fixed table-layout.
  35. * - IE7 will always honor that, even without fixed table-layout.
  36. * So we use both and assure that each column gets its width in the first row.
  37. */
  38. .cal table {
  39. table-layout: fixed;
  40. width: auto;
  41. }
  42. .cal table, .cal th, .cal td {
  43. margin: 0;
  44. padding: 0;
  45. }
  46. .cal caption {
  47. margin: 6px 6px 0;
  48. padding: 0;
  49. border-bottom: 1px solid #555;
  50. }
  51. /*
  52. * Settings to get day number and coloring according to state for split days.
  53. * - border-width will be defined in the generated css.
  54. * - border-color will be overruled based on the defined availability states.
  55. */
  56. .cal td > span {
  57. display: block;
  58. position: relative; /* Allows to position inner span w.r.t this span. */
  59. border-style: solid;
  60. border-color: transparent;
  61. }
  62. .cal td > span > span {
  63. position: absolute;
  64. z-index: 1;
  65. }
  66. /* Allows to highlight a border on hovering (without disturbing the lay-out). */
  67. .cal td > div, .cal td > span > span {
  68. border: 1px solid transparent;
  69. }
  70. /*
  71. * Special statuses:
  72. * cal-other: cells from another month (at the start of end of a calendar month).
  73. * cal-pastdate: cell for days in the past.
  74. * cal-today: cell for the current day.
  75. * cal-selectable: cells that are selectable.
  76. * cal-selected: cell that has been selected.
  77. * cal-empty: cell (with colspan=7) for an empty 6th week.
  78. */
  79. /* these selectors need to be stronger than those for the availability states. */
  80. .cal th,
  81. .cal .cal-other, .cal .cal-other > div, .cal .cal-other > span,
  82. .cal .cal-pastdate, .cal .cal-pastdate div, .cal .cal-pastdate > span {
  83. background-color: transparent;
  84. border-color: transparent;
  85. }
  86. .cal td > span {
  87. border-color: transparent;
  88. }
  89. .cal-other {
  90. color: #aaa;
  91. }
  92. .cal-today {
  93. font-weight: bolder;
  94. }
  95. .cal-selected {
  96. font-weight: bolder;
  97. font-size: larger;
  98. }
  99. .cal .cal-selected > div, .cal .calselected > span > span {
  100. border-color: #555;
  101. }
  102. .cal-selectable {
  103. cursor: pointer;
  104. }
  105. /* Table cells and spans cannot get :focus, so no need to define that pseudo class. */
  106. .cal-selectable:hover > div, .cal-selectable:hover > span > span {
  107. border-color: #555;
  108. }
  109. /*
  110. * Key
  111. */
  112. .keystatus {
  113. padding-left: 2px; /* LTR */
  114. }
  115. .cal td.keystatus div {
  116. width: auto;
  117. }
  118. /*
  119. * View calendar through a viewport, also see availability_calendar.view.js.
  120. */
  121. .cal-viewport {
  122. position: relative;
  123. overflow: hidden;
  124. }
  125. .cal-viewport-inner {
  126. position: relative;
  127. top: 0;
  128. left: 0; /* LTR */
  129. overflow: visible;
  130. }
  131. .cal-backward, .cal-forward {
  132. cursor: pointer;
  133. }
  134. .cal-backward[disabled], .cal-forward[disabled] {
  135. cursor: inherit;
  136. pointer-events: none;
  137. }