elements.pcss.css

Same filename in other branches
  1. 9 core/themes/claro/css/base/elements.pcss.css
  2. 8.9.x core/themes/claro/css/base/elements.pcss.css
  3. 10 core/themes/claro/css/base/elements.pcss.css
/**
 * Generic elements.
 */

html {
  font-family: var(--font-family);
  font-size: 100%;
  font-weight: normal;
  font-style: normal;
  line-height: var(--line-height);
}
body {
  word-wrap: break-word;
  hyphens: auto;
  color: var(--color-fg);
  background: var(--color-bg);
}

a,
.link {
  color: var(--color-link);
}
a:hover,
a:focus,
.link:hover,
.link:focus {
  text-decoration: none;
  outline: 0;
}
a:hover,
.link:hover {
  color: var(--color-link-hover);
}
a:active,
.link:active {
  color: var(--color-link-active);
}
hr {
  height: 1px;
  margin: var(--space-m) 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);
  font-size: var(--font-size-h1);
  font-weight: bold;
  line-height: var(--line-height-heading);
}
h2,
.heading-b {
  margin: var(--space-m) 0 var(--space-s);
  font-size: var(--font-size-h2);
  font-weight: bold;
  line-height: var(--line-height-heading);
}
h3,
.heading-c {
  margin: var(--space-m) 0 var(--space-s);
  font-size: var(--font-size-h3);
  font-weight: bold;
  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-block: var(--space-l);
  margin-inline: 2.5rem var(--space-l);
  font-size: var(--font-size-h6);
}
blockquote::before {
  position: absolute;
  inset-inline-start: -2.5rem;
  content: open-quote;
  color: var(--color-absolutezero);
  font-family: var(--font-family-serif);
  font-size: var(--space-xl);
  line-height: 1em;
}
blockquote::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-type: disc;
  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: 0.95em 1.45em;

    &:focus {
      outline: none;
    }
  }
}
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);
  box-shadow: var(--focus-box-shadow);
}

/**
 * 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;
}

File

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

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

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