You are here

elements.pcss.css in Drupal 10

/**
 * Generic elements.
 */

html {
  font-family: var(--font-family);
  font-size: 100%;
  font-weight: normal;
  font-style: normal;
  line-height: var(--line-height);
}
body {
  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-bottom: 10px;
  margin-left: 20px; /* LTR */
}
[dir="rtl"] dl dd,
[dir="rtl"] dl dl {
  margin-right: 20px;
}
blockquote {
  position: relative;
  margin: var(--space-l);
  margin-left: 2.5rem; /* LTR */
  font-size: var(--font-size-h6);
}
[dir="rtl"] blockquote {
  margin-right: 2.5rem;
}
blockquote::before {
  position: absolute;
  left: -2.5rem; /* LTR */
  content: open-quote;
  color: var(--color-absolutezero);
  font-family: var(--font-family-serif);
  font-size: var(--space-xl);
  line-height: 1em;
}
[dir="rtl"] blockquote::before {
  right: -2.5rem;
}
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: 0.25em 0 0.25em 1.5em; /* LTR */
  padding-left: 0;
  list-style-type: disc;
  list-style-image: none;
}
[dir="rtl"] ul {
  margin-right: 1.5em;
  margin-left: 0;
  padding-right: 0;
}
/* This is required to win over specificity of [dir="rtl"] ul */
[dir="rtl"] .messages__list {
  margin-right: 0;
}
ol {
  margin: 0.25em 0 0.25em 2em; /* LTR */
  padding: 0;
  list-style-type: decimal;
}
[dir="rtl"] ol {
  margin-right: 2em;
  margin-left: 0;
}

/**
 * Fix duplicate border caused by normalize.css adding border-bottom without
 * removing the text-decoration.
 */
abbr[title] {
  text-decoration: none;
}

code {
  margin: 0.5em 0;
}
pre {
  margin: 0.5em 0;
  white-space: pre-wrap;
}
details {
  line-height: var(--details-line-height);
}
details summary {
  padding: 0.95em 1.45em;
}
details summary: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.
 *
 * @todo https://www.drupal.org/project/claro/issues/3048785 :focus selector is
 *   active for non-interactive elements in Internet Explorer 11.
 */
.page-wrapper *:focus,
.ui-dialog *:focus {
  outline: var(--focus-outline);
  box-shadow: var(--focus-box-shadow);
}

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. color: var(--color-fg);
  13. background: var(--color-bg);
  14. }
  15. a,
  16. .link {
  17. color: var(--color-link);
  18. }
  19. a:hover,
  20. a:focus,
  21. .link:hover,
  22. .link:focus {
  23. text-decoration: none;
  24. outline: 0;
  25. }
  26. a:hover,
  27. .link:hover {
  28. color: var(--color-link-hover);
  29. }
  30. a:active,
  31. .link:active {
  32. color: var(--color-link-active);
  33. }
  34. hr {
  35. height: 1px;
  36. margin: var(--space-m) 0;
  37. padding: 0;
  38. border: none;
  39. background: var(--color-divider);
  40. }
  41. summary {
  42. font-weight: bold;
  43. }
  44. /**
  45. * Reusable heading classes are included to help modules change the styling of
  46. * headings on a page without affecting accessibility.
  47. */
  48. h1,
  49. .heading-a {
  50. margin: var(--space-m) 0 var(--space-s);
  51. font-size: var(--font-size-h1);
  52. font-weight: bold;
  53. line-height: var(--line-height-heading);
  54. }
  55. h2,
  56. .heading-b {
  57. margin: var(--space-m) 0 var(--space-s);
  58. font-size: var(--font-size-h2);
  59. font-weight: bold;
  60. line-height: var(--line-height-heading);
  61. }
  62. h3,
  63. .heading-c {
  64. margin: var(--space-m) 0 var(--space-s);
  65. font-size: var(--font-size-h3);
  66. font-weight: bold;
  67. line-height: var(--line-height-heading);
  68. }
  69. h4,
  70. .heading-d {
  71. margin: var(--space-m) 0 var(--space-s);
  72. font-size: var(--font-size-h4);
  73. font-weight: bold;
  74. line-height: var(--line-height-heading);
  75. }
  76. h5,
  77. .heading-e {
  78. margin: var(--space-m) 0 var(--space-s);
  79. font-size: var(--font-size-h5);
  80. font-weight: bold;
  81. line-height: var(--line-height-heading);
  82. }
  83. h6,
  84. .heading-f {
  85. margin: var(--space-m) 0 var(--space-s);
  86. font-size: var(--font-size-h6);
  87. font-weight: bold;
  88. line-height: var(--line-height-heading);
  89. }
  90. p {
  91. margin: 1em 0;
  92. }
  93. dl {
  94. margin: 0 0 20px;
  95. }
  96. dl dd,
  97. dl dl {
  98. margin-bottom: 10px;
  99. margin-left: 20px; /* LTR */
  100. }
  101. [dir="rtl"] dl dd,
  102. [dir="rtl"] dl dl {
  103. margin-right: 20px;
  104. }
  105. blockquote {
  106. position: relative;
  107. margin: var(--space-l);
  108. margin-left: 2.5rem; /* LTR */
  109. font-size: var(--font-size-h6);
  110. }
  111. [dir="rtl"] blockquote {
  112. margin-right: 2.5rem;
  113. }
  114. blockquote::before {
  115. position: absolute;
  116. left: -2.5rem; /* LTR */
  117. content: open-quote;
  118. color: var(--color-absolutezero);
  119. font-family: var(--font-family-serif);
  120. font-size: var(--space-xl);
  121. line-height: 1em;
  122. }
  123. [dir="rtl"] blockquote::before {
  124. right: -2.5rem;
  125. }
  126. blockquote::after {
  127. content: no-close-quote;
  128. }
  129. address {
  130. font-style: italic;
  131. }
  132. u,
  133. ins {
  134. text-decoration: underline;
  135. }
  136. s,
  137. strike,
  138. del {
  139. text-decoration: line-through;
  140. }
  141. big {
  142. font-size: larger;
  143. }
  144. small {
  145. font-size: smaller;
  146. }
  147. sub {
  148. vertical-align: sub;
  149. font-size: smaller;
  150. line-height: normal;
  151. }
  152. sup {
  153. vertical-align: super;
  154. font-size: smaller;
  155. line-height: normal;
  156. }
  157. abbr,
  158. acronym {
  159. border-bottom: dotted 1px;
  160. }
  161. ul {
  162. margin: 0.25em 0 0.25em 1.5em; /* LTR */
  163. padding-left: 0;
  164. list-style-type: disc;
  165. list-style-image: none;
  166. }
  167. [dir="rtl"] ul {
  168. margin-right: 1.5em;
  169. margin-left: 0;
  170. padding-right: 0;
  171. }
  172. /* This is required to win over specificity of [dir="rtl"] ul */
  173. [dir="rtl"] .messages__list {
  174. margin-right: 0;
  175. }
  176. ol {
  177. margin: 0.25em 0 0.25em 2em; /* LTR */
  178. padding: 0;
  179. list-style-type: decimal;
  180. }
  181. [dir="rtl"] ol {
  182. margin-right: 2em;
  183. margin-left: 0;
  184. }
  185. /**
  186. * Fix duplicate border caused by normalize.css adding border-bottom without
  187. * removing the text-decoration.
  188. */
  189. abbr[title] {
  190. text-decoration: none;
  191. }
  192. code {
  193. margin: 0.5em 0;
  194. }
  195. pre {
  196. margin: 0.5em 0;
  197. white-space: pre-wrap;
  198. }
  199. details {
  200. line-height: var(--details-line-height);
  201. }
  202. details summary {
  203. padding: 0.95em 1.45em;
  204. }
  205. details summary:focus {
  206. outline: none;
  207. }
  208. img {
  209. max-width: 100%;
  210. height: auto;
  211. }
  212. /**
  213. * Default focus styles for focused elements.
  214. *
  215. * This is applied globally to all interactive elements except Toolbar and
  216. * Settings Tray since they have their own styles.
  217. *
  218. * @todo https://www.drupal.org/project/claro/issues/3048785 :focus selector is
  219. * active for non-interactive elements in Internet Explorer 11.
  220. */
  221. .page-wrapper *:focus,
  222. .ui-dialog *:focus {
  223. outline: var(--focus-outline);
  224. box-shadow: var(--focus-box-shadow);
  225. }