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(--admin-color-bg);

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

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

  &:hover {
    -webkit-text-decoration: none;
    text-decoration: none;
    color: var(--admin-color-link-hover);
  }

  &:focus {
    -webkit-text-decoration: none;
    text-decoration: none;
  }

  &:active {
    color: var(--admin-color-link-active);
  }
}

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

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.
 */

.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. */

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

/* Enforcing colors on visually hidden text prevents accessibility scanners from
   reporting contrast errors for text that is not visually rendered. */

.visually-hidden {
  color: #000;

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

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