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(--gin-color-primary-light-hover);
}

html {
  font-family: var(--gin-font);
  font-size: 100%;
  font-weight: normal;
  font-style: normal;
  line-height: var(--line-height);
  scroll-padding-block-start: var(--gin-scroll-offset) !important;
}

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

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

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

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

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

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

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

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

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(--space-m) 0 var(--space-s);
  letter-spacing: -0.025em;
  font-size: var(--font-size-h1);
  font-weight: var(--gin-font-weight-normal);
  line-height: var(--line-height-heading);
}

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

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

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

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

h6,
.heading-f {
  margin: var(--space-m) 0 var(--space-s);
  font-size: var(--font-size-h6);
  font-weight: bold;
  line-height: var(--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(--gin-spacing-m);
  padding-inline-start: var(--gin-spacing-l);
  font-size: var(--gin-font-size-quote);

  &::before {
    position: absolute;
    display: block;
    width: 4px;
    height: 100%;
    content: "";
    color: var(--color-absolutezero);
    border-radius: 2px;
    background-color: var(--gin-color-primary);
    font-family: var(--font-family-serif);
    font-size: var(--space-xxl);
    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(--gin-spacing-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(--gin-color-button-text);
  }
}

File

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

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

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