elements.pcss.css

Same filename in this branch
  1. main core/themes/claro/css/base/elements.pcss.css
  2. main core/themes/admin/css/base/elements.pcss.css
Same filename and directory in other branches
  1. 10 core/themes/claro/css/base/elements.pcss.css
  2. 11.x core/themes/claro/css/base/elements.pcss.css
  3. 9 core/themes/claro/css/base/elements.pcss.css
  4. 8.9.x core/themes/claro/css/base/elements.pcss.css
  5. 11.x core/themes/admin/css/base/elements.pcss.css
  6. 11.x core/themes/default_admin/css/base/elements.pcss.css
/**
 * 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 {
    text-decoration: none;
    color: var(--admin-color-link-hover);
  }

  &:focus {
    text-decoration: none;
  }

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

*|*:any-link:not(svg|a) {
  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 20px;
}

dl dd,
dl dl {
  margin-block-end: 10px;
  margin-inline-start: 20px;
}

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: 4px;
    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 {
  text-decoration: underline;
}

s,
strike,
del {
  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);
  outline-offset: var(--outline-offset);
}

/**
 * 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: var(--admin-color-text-loud);
}

File

core/themes/default_admin/css/base/elements.pcss.css

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

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