You are here

availability_calendars.base.css in Availability Calendars 7.2

Same filename and directory in other branches
  1. 6.2 availability_calendars.base.css
/*
 * Styling your calendar:
 * - This file contains some basic calendar styling.
 * - Visit admin/config/content/availability-calendars/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#availabitlity-calendar-{nid}.availability-calendar
 *   div.availability-calendars-viewport            ? optional when the viewport functionality is enabled
 *     div.availability-calendars-viewport-inner    ? optional
 *       div.calmonth-wrapper                       * repeated for each month
 *         table#cal-{year}-{month}-{nid}.cal.calmonth
 *           caption                                contains month name
 *           thead
 *             tr
 *               th                                 ? optiponal, if weeknotes are enabled, empty
 *               th                                 * repeated 7 times, containing short names of the days
 *           tbody
 *             tr.calweek                           * repeated 6 times, class calweek only if row does contain day cells
 *               th                                 ? optiponal, if weeknotes are enabled, contains weeknote
 *               td.cal...                          * repeated 7 times, representing a day in the month, class defines state(s) of that day
 *                 span                             containing day number in case of no split days, or the span below with split days
 *                   span                           ?optional, only with split days, containing day number 
 */
.calmonth-wrapper {
  float: left;
  margin: 0 6px 6px;
}

.cal {
  margin: 0;
  padding: 0;
}

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

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

/*
 * Special statuses
 */
.calother, .calother > span,
.calpastdate, .calpastdate span  {
  background-color: transparent;
  border-color: transparent;
}

.caltoday {
  font-weight: bolder;
}

.calselected {
  font-weight: bolder;
  font-size: larger;
  border-color: #aaa;
}

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

/*
 * Clickable calendars.
 * Clickable valid day cells (not in the past and having a state defined as
 * available) get a class calselectable. These classes are added via js, as
 * that is required anyway to react to the clicking.
 */
.calselectable {
  cursor: pointer;
}

/*
 * div for no split days, inner span for split days.
 */
.cal td > div, .cal td > span > span {
  border: 1px solid transparent;
}

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

/*
 * Settings to get day number and coloring according to state for split days.
 */
.cal td > span {
  display: block;
  position: relative;
  border-style: solid;
  border-color: transparent;
}

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

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

.cal td.keystatus, .cal td.keystatus div  {
  width: auto;
  padding: 0 0.7em;
}

/*
 * Edit calendar form.
 * - Show states and changes on the same line (won't work on IE7-, they will see the elements below each other).
 * - Display radio buttons and labels as a table (so that the colored labels get the same length).
 */
#edit-availability-states {
  display: table;
}

#edit-availability-states .form-item-availability-states {
  display: table-row;
  margin: 0;
  padding: 3px;
}

#edit-availability-states .form-item-availability-states input,
#edit-availability-states .form-item-availability-states label {
  display: table-cell;
  height: 2em;
  line-height: 2em;
  padding: 0 10px;
}

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

.availability-calendars-viewport-inner {
  position: relative;
  top: 0;
  left: 0;
  overflow: visible;
}

File

availability_calendars.base.css
View source
  1. /*
  2. * Styling your calendar:
  3. * - This file contains some basic calendar styling.
  4. * - Visit admin/config/content/availability-calendars/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#availabitlity-calendar-{nid}.availability-calendar
  9. * div.availability-calendars-viewport ? optional when the viewport functionality is enabled
  10. * div.availability-calendars-viewport-inner ? optional
  11. * div.calmonth-wrapper * repeated for each month
  12. * table#cal-{year}-{month}-{nid}.cal.calmonth
  13. * caption contains month name
  14. * thead
  15. * tr
  16. * th ? optiponal, if weeknotes are enabled, empty
  17. * th * repeated 7 times, containing short names of the days
  18. * tbody
  19. * tr.calweek * repeated 6 times, class calweek only if row does contain day cells
  20. * th ? optiponal, if weeknotes are enabled, contains weeknote
  21. * td.cal... * repeated 7 times, representing a day in the month, class defines state(s) of that day
  22. * span containing day number in case of no split days, or the span below with split days
  23. * span ?optional, only with split days, containing day number
  24. */
  25. .calmonth-wrapper {
  26. float: left;
  27. margin: 0 6px 6px;
  28. }
  29. .cal {
  30. margin: 0;
  31. padding: 0;
  32. }
  33. .cal caption {
  34. margin: 6px 6px 0;
  35. padding: 0;
  36. border-bottom: 1px solid #aaa;
  37. }
  38. table.cal tr th, table.cal tr td {
  39. margin: 0;
  40. padding: 0;
  41. }
  42. /*
  43. * Special statuses
  44. */
  45. .calother, .calother > span,
  46. .calpastdate, .calpastdate span {
  47. background-color: transparent;
  48. border-color: transparent;
  49. }
  50. .caltoday {
  51. font-weight: bolder;
  52. }
  53. .calselected {
  54. font-weight: bolder;
  55. font-size: larger;
  56. border-color: #aaa;
  57. }
  58. .cal .calselected > div, .cal .calselected > span > span {
  59. border-color: #aaa;
  60. }
  61. /*
  62. * Clickable calendars.
  63. * Clickable valid day cells (not in the past and having a state defined as
  64. * available) get a class calselectable. These classes are added via js, as
  65. * that is required anyway to react to the clicking.
  66. */
  67. .calselectable {
  68. cursor: pointer;
  69. }
  70. /*
  71. * div for no split days, inner span for split days.
  72. */
  73. .cal td > div, .cal td > span > span {
  74. border: 1px solid transparent;
  75. }
  76. /*
  77. * Table cells and spans cannot get :focus, so no need to define that pseudo class.
  78. */
  79. .calselectable:hover > div, .calselectable:hover > span > span {
  80. border-color: #aaa;
  81. }
  82. /*
  83. * Settings to get day number and coloring according to state for split days.
  84. */
  85. .cal td > span {
  86. display: block;
  87. position: relative;
  88. border-style: solid;
  89. border-color: transparent;
  90. }
  91. .cal td > span > span {
  92. position: absolute;
  93. z-index: 1;
  94. }
  95. /*
  96. * Key
  97. */
  98. .keystatus {
  99. padding-left: 2px;
  100. }
  101. .cal td.keystatus, .cal td.keystatus div {
  102. width: auto;
  103. padding: 0 0.7em;
  104. }
  105. /*
  106. * Edit calendar form.
  107. * - Show states and changes on the same line (won't work on IE7-, they will see the elements below each other).
  108. * - Display radio buttons and labels as a table (so that the colored labels get the same length).
  109. */
  110. #edit-availability-states {
  111. display: table;
  112. }
  113. #edit-availability-states .form-item-availability-states {
  114. display: table-row;
  115. margin: 0;
  116. padding: 3px;
  117. }
  118. #edit-availability-states .form-item-availability-states input,
  119. #edit-availability-states .form-item-availability-states label {
  120. display: table-cell;
  121. height: 2em;
  122. line-height: 2em;
  123. padding: 0 10px;
  124. }
  125. /*
  126. * View calendar through a viewport, also see availability_calendars.view.js.
  127. */
  128. .availability-calendars-viewport {
  129. position: relative;
  130. overflow: hidden;
  131. }
  132. .availability-calendars-viewport-inner {
  133. position: relative;
  134. top: 0;
  135. left: 0;
  136. overflow: visible;
  137. }