elements.css

Same filename in this branch
  1. main core/themes/claro/css/base/elements.css
  2. main core/themes/admin/css/base/elements.css
Same filename and directory in other branches
  1. 10 core/themes/claro/css/base/elements.css
  2. 11.x core/themes/claro/css/base/elements.css
  3. 9 core/themes/seven/css/base/elements.css
  4. 9 core/themes/claro/css/base/elements.css
  5. 9 core/themes/bartik/css/base/elements.css
  6. 8.9.x core/themes/seven/css/base/elements.css
  7. 8.9.x core/themes/claro/css/base/elements.css
  8. 8.9.x core/themes/bartik/css/base/elements.css
  9. 11.x core/themes/admin/css/base/elements.css
  10. 11.x core/themes/default_admin/css/base/elements.css
/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */

/**
 * Generic elements.
 */

::selection {
  background: var(--admin-color-primary-soft-hover);
}

html {
  font-family: var(--admin-font-family);
  font-size: 100%;
  font-weight: normal;
  font-style: normal;
  line-height: var(--admin-line-height);
  scroll-padding-block-start: var(--admin-theme-scroll-offset) !important;
  color-scheme: light; /* Can be overridden by inline styles. */
}

body {
  overflow-x: hidden;
  word-wrap: break-word;
  hyphens: auto;
  color: var(--admin-color-text);
  background: var(--app-bg-color);

  @media (--admin-large) {
    overflow-x: auto;
  }
}

a,
.link,
button.link {
  word-wrap: break-word;
  color: var(--admin-color-primary);
  overflow-wrap: break-word;
  text-decoration-style: var(--admin-link-decoration-style);
}

*|*:any-link:not(svg|a) {
  -webkit-text-decoration: underline;
  text-decoration: underline;
  text-decoration-style: var(--admin-link-decoration-style);
}

a:hover,
a:focus,
.link:hover,
.link:focus {
  -webkit-text-decoration: none;
  text-decoration: none;
}

a:hover,
.link:hover {
  color: var(--admin-color-link-hover);
}

a:active,
.link:active {
  color: var(--admin-color-link-active);
}

hr {
  height: 1px;
  margin: var(--admin-space-xl) 0;
  padding: 0;
  border: none;
  background: var(--admin-color-border);
}

summary {
  font-weight: bold;
}

/**
 * Reusable heading classes are included to help modules change the styling of
 * headings on a page without affecting accessibility.
 */

h1,
.heading-a {
  margin: var(--admin-space-m) 0 var(--admin-space-s);
  letter-spacing: -0.025em;
  font-size: var(--admin-font-size-h1);
  font-weight: var(--admin-font-weight-normal);
  line-height: var(--admin-line-height-heading);
}

h2,
.heading-b {
  margin: var(--admin-space-m) 0 var(--admin-space-s);
  letter-spacing: -0.025em;
  font-size: var(--admin-font-size-h2);
  font-weight: var(--admin-font-weight-normal);
  line-height: var(--admin-line-height-heading);
}

h3,
.heading-c {
  margin: var(--admin-space-m) 0 var(--admin-space-s);
  letter-spacing: -0.025em;
  font-size: var(--admin-font-size-h3);
  font-weight: var(--admin-font-weight-normal);
  line-height: var(--admin-line-height-heading);
}

h4,
.heading-d {
  margin: var(--admin-space-m) 0 var(--admin-space-s);
  font-size: var(--admin-font-size-h4);
  font-weight: bold;
  line-height: var(--admin-line-height-heading);
}

h5,
.heading-e {
  margin: var(--admin-space-m) 0 var(--admin-space-s);
  font-size: var(--admin-font-size-h5);
  font-weight: bold;
  line-height: var(--admin-line-height-heading);
}

h6,
.heading-f {
  margin: var(--admin-space-m) 0 var(--admin-space-s);
  font-size: var(--admin-font-size-h6);
  font-weight: bold;
  line-height: var(--admin-line-height-heading);
}

p {
  margin: 1em 0;
}

dl {
  margin: 0 0 1.25rem;
}

dl dd,
dl dl {
  margin-block-end: 0.625rem;
  margin-inline-start: 1.25rem;
}

blockquote {
  position: relative;
  margin: var(--admin-space-m);
  padding-inline-start: var(--admin-space-l);
  font-size: var(--admin-font-size-quote);

  &::before {
    position: absolute;
    display: block;
    width: 0.25rem;
    height: 100%;
    content: "";
    color: var(--admin-color-link);
    border-radius: 2px;
    background-color: var(--admin-color-primary);
    font-family: var(--admin-font-family-serif);
    font-size: var(--admin-space-2xl);
    line-height: 1em;
    inset-block-start: 0;
    inset-inline-start: 0;
  }

  &::after {
    content: no-close-quote;
  }
}

address {
  font-style: italic;
}

u,
ins {
  -webkit-text-decoration: underline;
  text-decoration: underline;
}

s,
strike,
del {
  -webkit-text-decoration: line-through;
  text-decoration: line-through;
}

big {
  font-size: larger;
}

small {
  font-size: smaller;
}

sub {
  vertical-align: sub;
  font-size: smaller;
  line-height: normal;
}

sup {
  vertical-align: super;
  font-size: smaller;
  line-height: normal;
}

abbr,
acronym {
  border-bottom: dotted 1px;
}

ul {
  margin-block: 0.25em;
  margin-inline: 1.5em 0;
  padding-inline-start: 0;
  list-style-image: none;
}

ol {
  margin-block: 0.25em;
  margin-inline: 2em 0;
  padding: 0;
}

code {
  margin: 0.5em 0;
}

pre {
  margin: 0.5em 0;
  white-space: pre-wrap;
}

details {
  line-height: var(--details-line-height);

  & summary {
    padding: var(--admin-space-m);
  }
}

img {
  max-width: 100%;
  height: auto;
}

/**
 * Default focus styles for focused elements.
 *
 * This is applied globally to all interactive elements except Toolbar and
 * Settings Tray since they have their own styles.
 */

.page-wrapper *:focus,
.ui-dialog *:focus {
  outline: var(--focus-outline);
}

/**
 * These elements should not be displayed until they are processed by
 * JavaScript, and views-ui-noscript.css exists so browsers without JavaScript
 * will still display them.
 */

.views-tabs,
.views-display-top > input.button {
  display: none;
}

/* Set a dark color scheme to style native browser elements. */

.gin--dark-mode {
  color-scheme: dark;
}

/* Enforcing colors on visually hidden text does not change anything for the
   user, but it prevents accessibility scanners like Wave from reporting contrast
   errors on visually hidden elements. While this is certainly an issue with the
   scanners and not Gin, this ensures that scans provide an accurate account of
   Gin's contrast support. */

.visually-hidden {
  color: #000;

  .gin--dark-mode & {
    color: #fff;
  }

  &.skip-link {
    color: var(--admin-color-text-on-primary);
  }
}

File

core/themes/default_admin/css/base/elements.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. * Generic elements.
  9. */
  10. ::selection {
  11. background: var(--admin-color-primary-soft-hover);
  12. }
  13. html {
  14. font-family: var(--admin-font-family);
  15. font-size: 100%;
  16. font-weight: normal;
  17. font-style: normal;
  18. line-height: var(--admin-line-height);
  19. scroll-padding-block-start: var(--admin-theme-scroll-offset) !important;
  20. color-scheme: light; /* Can be overridden by inline styles. */
  21. }
  22. body {
  23. overflow-x: hidden;
  24. word-wrap: break-word;
  25. hyphens: auto;
  26. color: var(--admin-color-text);
  27. background: var(--app-bg-color);
  28. @media (--admin-large) {
  29. overflow-x: auto;
  30. }
  31. }
  32. a,
  33. .link,
  34. button.link {
  35. word-wrap: break-word;
  36. color: var(--admin-color-primary);
  37. overflow-wrap: break-word;
  38. text-decoration-style: var(--admin-link-decoration-style);
  39. }
  40. *|*:any-link:not(svg|a) {
  41. -webkit-text-decoration: underline;
  42. text-decoration: underline;
  43. text-decoration-style: var(--admin-link-decoration-style);
  44. }
  45. a:hover,
  46. a:focus,
  47. .link:hover,
  48. .link:focus {
  49. -webkit-text-decoration: none;
  50. text-decoration: none;
  51. }
  52. a:hover,
  53. .link:hover {
  54. color: var(--admin-color-link-hover);
  55. }
  56. a:active,
  57. .link:active {
  58. color: var(--admin-color-link-active);
  59. }
  60. hr {
  61. height: 1px;
  62. margin: var(--admin-space-xl) 0;
  63. padding: 0;
  64. border: none;
  65. background: var(--admin-color-border);
  66. }
  67. summary {
  68. font-weight: bold;
  69. }
  70. /**
  71. * Reusable heading classes are included to help modules change the styling of
  72. * headings on a page without affecting accessibility.
  73. */
  74. h1,
  75. .heading-a {
  76. margin: var(--admin-space-m) 0 var(--admin-space-s);
  77. letter-spacing: -0.025em;
  78. font-size: var(--admin-font-size-h1);
  79. font-weight: var(--admin-font-weight-normal);
  80. line-height: var(--admin-line-height-heading);
  81. }
  82. h2,
  83. .heading-b {
  84. margin: var(--admin-space-m) 0 var(--admin-space-s);
  85. letter-spacing: -0.025em;
  86. font-size: var(--admin-font-size-h2);
  87. font-weight: var(--admin-font-weight-normal);
  88. line-height: var(--admin-line-height-heading);
  89. }
  90. h3,
  91. .heading-c {
  92. margin: var(--admin-space-m) 0 var(--admin-space-s);
  93. letter-spacing: -0.025em;
  94. font-size: var(--admin-font-size-h3);
  95. font-weight: var(--admin-font-weight-normal);
  96. line-height: var(--admin-line-height-heading);
  97. }
  98. h4,
  99. .heading-d {
  100. margin: var(--admin-space-m) 0 var(--admin-space-s);
  101. font-size: var(--admin-font-size-h4);
  102. font-weight: bold;
  103. line-height: var(--admin-line-height-heading);
  104. }
  105. h5,
  106. .heading-e {
  107. margin: var(--admin-space-m) 0 var(--admin-space-s);
  108. font-size: var(--admin-font-size-h5);
  109. font-weight: bold;
  110. line-height: var(--admin-line-height-heading);
  111. }
  112. h6,
  113. .heading-f {
  114. margin: var(--admin-space-m) 0 var(--admin-space-s);
  115. font-size: var(--admin-font-size-h6);
  116. font-weight: bold;
  117. line-height: var(--admin-line-height-heading);
  118. }
  119. p {
  120. margin: 1em 0;
  121. }
  122. dl {
  123. margin: 0 0 1.25rem;
  124. }
  125. dl dd,
  126. dl dl {
  127. margin-block-end: 0.625rem;
  128. margin-inline-start: 1.25rem;
  129. }
  130. blockquote {
  131. position: relative;
  132. margin: var(--admin-space-m);
  133. padding-inline-start: var(--admin-space-l);
  134. font-size: var(--admin-font-size-quote);
  135. &::before {
  136. position: absolute;
  137. display: block;
  138. width: 0.25rem;
  139. height: 100%;
  140. content: "";
  141. color: var(--admin-color-link);
  142. border-radius: 2px;
  143. background-color: var(--admin-color-primary);
  144. font-family: var(--admin-font-family-serif);
  145. font-size: var(--admin-space-2xl);
  146. line-height: 1em;
  147. inset-block-start: 0;
  148. inset-inline-start: 0;
  149. }
  150. &::after {
  151. content: no-close-quote;
  152. }
  153. }
  154. address {
  155. font-style: italic;
  156. }
  157. u,
  158. ins {
  159. -webkit-text-decoration: underline;
  160. text-decoration: underline;
  161. }
  162. s,
  163. strike,
  164. del {
  165. -webkit-text-decoration: line-through;
  166. text-decoration: line-through;
  167. }
  168. big {
  169. font-size: larger;
  170. }
  171. small {
  172. font-size: smaller;
  173. }
  174. sub {
  175. vertical-align: sub;
  176. font-size: smaller;
  177. line-height: normal;
  178. }
  179. sup {
  180. vertical-align: super;
  181. font-size: smaller;
  182. line-height: normal;
  183. }
  184. abbr,
  185. acronym {
  186. border-bottom: dotted 1px;
  187. }
  188. ul {
  189. margin-block: 0.25em;
  190. margin-inline: 1.5em 0;
  191. padding-inline-start: 0;
  192. list-style-image: none;
  193. }
  194. ol {
  195. margin-block: 0.25em;
  196. margin-inline: 2em 0;
  197. padding: 0;
  198. }
  199. code {
  200. margin: 0.5em 0;
  201. }
  202. pre {
  203. margin: 0.5em 0;
  204. white-space: pre-wrap;
  205. }
  206. details {
  207. line-height: var(--details-line-height);
  208. & summary {
  209. padding: var(--admin-space-m);
  210. }
  211. }
  212. img {
  213. max-width: 100%;
  214. height: auto;
  215. }
  216. /**
  217. * Default focus styles for focused elements.
  218. *
  219. * This is applied globally to all interactive elements except Toolbar and
  220. * Settings Tray since they have their own styles.
  221. */
  222. .page-wrapper *:focus,
  223. .ui-dialog *:focus {
  224. outline: var(--focus-outline);
  225. }
  226. /**
  227. * These elements should not be displayed until they are processed by
  228. * JavaScript, and views-ui-noscript.css exists so browsers without JavaScript
  229. * will still display them.
  230. */
  231. .views-tabs,
  232. .views-display-top > input.button {
  233. display: none;
  234. }
  235. /* Set a dark color scheme to style native browser elements. */
  236. .gin--dark-mode {
  237. color-scheme: dark;
  238. }
  239. /* Enforcing colors on visually hidden text does not change anything for the
  240. user, but it prevents accessibility scanners like Wave from reporting contrast
  241. errors on visually hidden elements. While this is certainly an issue with the
  242. scanners and not Gin, this ensures that scans provide an accurate account of
  243. Gin's contrast support. */
  244. .visually-hidden {
  245. color: #000;
  246. .gin--dark-mode
  247. &.skip-link {
  248. color: var(--admin-color-text-on-primary);
  249. }
  250. }

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