details.css

Same filename in this branch
  1. 9 core/profiles/demo_umami/themes/umami/css/classy/components/details.css
  2. 9 core/themes/seven/css/components/details.css
  3. 9 core/themes/claro/css/components/details.css
  4. 9 core/themes/bartik/css/classy/components/details.css
  5. 9 core/themes/starterkit_theme/css/components/details.css
  6. 9 core/themes/classy/css/components/details.css
Same filename in other branches
  1. 8.9.x core/profiles/demo_umami/themes/umami/css/classy/components/details.css
  2. 8.9.x core/themes/seven/css/components/details.css
  3. 8.9.x core/themes/claro/css/components/details.css
  4. 8.9.x core/themes/bartik/css/classy/components/details.css
  5. 8.9.x core/themes/classy/css/components/details.css
  6. 10 core/profiles/demo_umami/themes/umami/css/classy/components/details.css
  7. 10 core/misc/dialog/off-canvas/css/details.css
  8. 10 core/themes/olivero/css/components/details.css
  9. 10 core/themes/claro/css/components/details.css
  10. 10 core/themes/starterkit_theme/css/components/details.css
  11. 11.x core/profiles/demo_umami/themes/umami/css/classy/components/details.css
  12. 11.x core/misc/dialog/off-canvas/css/details.css
  13. 11.x core/themes/olivero/css/components/details.css
  14. 11.x core/themes/claro/css/components/details.css
  15. 11.x core/themes/starterkit_theme/css/components/details.css

Collapsible details.

File

core/themes/olivero/css/components/details.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Collapsible details.
  10. */
  11. .olivero-details {
  12. display: block;
  13. margin-top: 1.125rem;
  14. margin-bottom: 1.125rem;
  15. color: inherit;
  16. border: 1px solid #e7edf1;
  17. border-radius: 0.1875rem;
  18. box-shadow: 0 1px 4px #d7e1e8;
  19. }
  20. /* Details summary styles */
  21. [dir="ltr"] .olivero-details__summary {
  22. padding-left: 2.25rem;
  23. }
  24. [dir="rtl"] .olivero-details__summary {
  25. padding-right: 2.25rem;
  26. }
  27. [dir="ltr"] .olivero-details__summary {
  28. padding-right: 1.125rem;
  29. }
  30. [dir="rtl"] .olivero-details__summary {
  31. padding-left: 1.125rem;
  32. }
  33. .olivero-details__summary {
  34. position: relative;
  35. padding-top: 1.125rem;
  36. padding-bottom: 1.125rem;
  37. list-style: none;
  38. cursor: pointer;
  39. transition: background-color 0.12s ease-in-out;
  40. word-wrap: break-word;
  41. -webkit-hyphens: auto;
  42. -ms-hyphens: auto;
  43. hyphens: auto;
  44. color: inherit;
  45. background-color: #f7f9fa;
  46. font-size: 1.125rem;
  47. font-weight: 700;
  48. line-height: 1.125rem;
  49. }
  50. /* Arrow icon */
  51. [dir="ltr"] .olivero-details__summary:before,
  52. [dir="ltr"] .collapse-processed > .olivero-details__summary .details-title:before {
  53. left: 0.84375rem;
  54. }
  55. [dir="rtl"] .olivero-details__summary:before,
  56. [dir="rtl"] .collapse-processed > .olivero-details__summary .details-title:before {
  57. right: 0.84375rem;
  58. }
  59. .olivero-details__summary:before,
  60. .collapse-processed > .olivero-details__summary .details-title:before {
  61. position: absolute;
  62. top: 50%;
  63. display: block;
  64. width: 0.625rem;
  65. height: 0.625rem;
  66. content: "";
  67. transform: translateY(-50%) rotate(45deg); /* LTR */
  68. border-top: solid 2px currentColor;
  69. border-right: solid 2px currentColor;
  70. }
  71. [dir="rtl"] .olivero-details__summary:before,
  72. [dir="rtl"] .collapse-processed > .olivero-details__summary .details-title:before {
  73. transform: translateY(-50%) rotate(-135deg);
  74. }
  75. /* Pseudo-selector to manage focus styles */
  76. .olivero-details__summary:after,
  77. .collapse-processed > .olivero-details__summary .details-title:after {
  78. position: absolute;
  79. top: -1px;
  80. right: -1px;
  81. bottom: -1px;
  82. left: -1px;
  83. content: "";
  84. pointer-events: none;
  85. opacity: 0;
  86. border-radius: 0.1875rem;
  87. box-shadow: inset 0 0 0 2px #53b0eb;
  88. }
  89. /* Hide the marker */
  90. .olivero-details__summary::-webkit-details-marker {
  91. display: none;
  92. }
  93. /* Disable default outline for summary, since we have own implementation */
  94. .olivero-details__summary:focus {
  95. outline: solid 2px transparent;
  96. outline-offset: -4px;
  97. }
  98. /* Details summary, hover state */
  99. .olivero-details__summary:hover {
  100. background-color: #e7edf1;
  101. }
  102. /* Details summary, focus and active states */
  103. .olivero-details__summary:focus:after,
  104. .olivero-details__summary:active:after,
  105. .collapse-processed > .olivero-details__summary .details-title:focus:after,
  106. .collapse-processed > .olivero-details__summary .details-title:active:after {
  107. opacity: 1;
  108. }
  109. /* Rotate arrow icon of the details summary, when details expanded */
  110. .olivero-details[open] > .olivero-details__summary::before,
  111. .collapse-processed[open] > .olivero-details__summary .details-title::before {
  112. margin-top: -2px;
  113. transform: translateY(-50%) rotate(135deg);
  114. }
  115. /* Collapse processed for non-supporting browsers like IE or Edge */
  116. [dir="ltr"] .collapse-processed > .olivero-details__summary {
  117. padding-left: 0;
  118. }
  119. [dir="rtl"] .collapse-processed > .olivero-details__summary {
  120. padding-right: 0;
  121. }
  122. [dir="ltr"] .collapse-processed > .olivero-details__summary {
  123. padding-right: 0;
  124. }
  125. [dir="rtl"] .collapse-processed > .olivero-details__summary {
  126. padding-left: 0;
  127. }
  128. .collapse-processed > .olivero-details__summary {
  129. padding-top: 0;
  130. padding-bottom: 0;
  131. }
  132. .collapse-processed > .olivero-details__summary:before {
  133. content: none;
  134. }
  135. .collapse-processed > .olivero-details__summary:after {
  136. content: none;
  137. }
  138. [dir="ltr"] .collapse-processed > .olivero-details__summary .details-title {
  139. padding-left: 2.25rem;
  140. }
  141. [dir="rtl"] .collapse-processed > .olivero-details__summary .details-title {
  142. padding-right: 2.25rem;
  143. }
  144. [dir="ltr"] .collapse-processed > .olivero-details__summary .details-title {
  145. padding-right: 1.125rem;
  146. }
  147. [dir="rtl"] .collapse-processed > .olivero-details__summary .details-title {
  148. padding-left: 1.125rem;
  149. }
  150. .collapse-processed > .olivero-details__summary .details-title {
  151. position: relative;
  152. display: block;
  153. padding-top: 1.125rem;
  154. padding-bottom: 1.125rem;
  155. transition: background-color 0.12s ease-in-out;
  156. text-decoration: none;
  157. color: inherit;
  158. background-color: #f7f9fa;
  159. }
  160. .collapse-processed > .olivero-details__summary .details-title:focus {
  161. outline: solid 2px transparent;
  162. }
  163. .collapse-processed > .olivero-details__summary .details-title:hover {
  164. background-color: #e7edf1;
  165. }
  166. @media screen and (-ms-high-contrast: active) {
  167. .collapse-processed > .olivero-details__summary .details-title::after {
  168. top: -0.3125rem;
  169. right: -0.3125rem;
  170. bottom: -0.3125rem;
  171. left: -0.3125rem;
  172. border: 2px dotted;
  173. }
  174. }
  175. /* Details content wrapper */
  176. .olivero-details__wrapper {
  177. margin: 1.125rem;
  178. }
  179. @media (min-width: 62.5rem) {
  180. [dir="ltr"] .olivero-details__wrapper {
  181. margin-left: 2.25rem;
  182. }
  183. [dir="rtl"] .olivero-details__wrapper {
  184. margin-right: 2.25rem;
  185. }
  186. [dir="ltr"] .olivero-details__wrapper {
  187. margin-right: 2.25rem;
  188. }
  189. [dir="rtl"] .olivero-details__wrapper {
  190. margin-left: 2.25rem;
  191. }
  192. .olivero-details__wrapper {
  193. margin-top: 1.6875rem;
  194. margin-bottom: 1.6875rem;
  195. }
  196. }
  197. /* Description */
  198. .olivero-details__description {
  199. margin-bottom: 1.125rem;
  200. color: #313637;
  201. font-size: 0.8125rem;
  202. line-height: 1.125rem;
  203. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.