| 1 |
@use '../../sass-utilities' as *; |
| 2 |
|
| 3 |
@include pf-root(':root', false) { |
| 4 |
// Body |
| 5 |
--#{$content}--MarginBlockEnd: var(--pf-t--global--spacer--md); |
| 6 |
--#{$content}--LineHeight: var(--pf-t--global--font--line-height--body); |
| 7 |
--#{$content}--FontSize: var(--pf-t--global--font--size--body--default); |
| 8 |
--#{$content}--m-editorial--FontSize: var(--pf-t--global--font--size--body--lg); |
| 9 |
--#{$content}--FontWeight: var(--pf-t--global--font--weight--body--default); |
| 10 |
|
| 11 |
// this ensures color is not overridden |
| 12 |
--#{$content}--Color: var(--pf-t--global--text--color--regular); |
| 13 |
|
| 14 |
// Headings |
| 15 |
--#{$content}--heading--FontFamily: var(--pf-t--global--font--family--heading); |
| 16 |
|
| 17 |
// h1 |
| 18 |
--#{$content}--h1--MarginBlockStart: var(--pf-t--global--spacer--lg); |
| 19 |
--#{$content}--h1--MarginBlockEnd: var(--pf-t--global--spacer--sm); |
| 20 |
--#{$content}--h1--LineHeight: var(--pf-t--global--font--line-height--heading); |
| 21 |
--#{$content}--h1--FontSize: var(--pf-t--global--font--size--heading--h1); |
| 22 |
--#{$content}--h1--FontWeight: var(--pf-t--global--font--weight--heading--default); |
| 23 |
|
| 24 |
// h2 |
| 25 |
--#{$content}--h2--MarginBlockStart: var(--pf-t--global--spacer--lg); |
| 26 |
--#{$content}--h2--MarginBlockEnd: var(--pf-t--global--spacer--sm); |
| 27 |
--#{$content}--h2--LineHeight: var(--pf-t--global--font--line-height--heading); |
| 28 |
--#{$content}--h2--FontSize: var(--pf-t--global--font--size--heading--h2); |
| 29 |
--#{$content}--h2--FontWeight: var(--pf-t--global--font--weight--heading--default); |
| 30 |
|
| 31 |
// h3 |
| 32 |
--#{$content}--h3--MarginBlockStart: var(--pf-t--global--spacer--lg); |
| 33 |
--#{$content}--h3--MarginBlockEnd: var(--pf-t--global--spacer--sm); |
| 34 |
--#{$content}--h3--LineHeight: var(--pf-t--global--font--line-height--heading); |
| 35 |
--#{$content}--h3--FontSize: var(--pf-t--global--font--size--heading--h3); |
| 36 |
--#{$content}--h3--FontWeight: var(--pf-t--global--font--weight--heading--default); |
| 37 |
|
| 38 |
// h4 |
| 39 |
--#{$content}--h4--MarginBlockStart: var(--pf-t--global--spacer--lg); |
| 40 |
--#{$content}--h4--MarginBlockEnd: var(--pf-t--global--spacer--sm); |
| 41 |
--#{$content}--h4--LineHeight: var(--pf-t--global--font--line-height--heading); |
| 42 |
--#{$content}--h4--FontSize: var(--pf-t--global--font--size--heading--h4); |
| 43 |
--#{$content}--h4--FontWeight: var(--pf-t--global--font--weight--heading--default); |
| 44 |
|
| 45 |
// h5 |
| 46 |
--#{$content}--h5--MarginBlockStart: var(--pf-t--global--spacer--lg); |
| 47 |
--#{$content}--h5--MarginBlockEnd: var(--pf-t--global--spacer--sm); |
| 48 |
--#{$content}--h5--LineHeight: var(--pf-t--global--font--line-height--heading); |
| 49 |
--#{$content}--h5--FontSize: var(--pf-t--global--font--size--heading--h5); |
| 50 |
--#{$content}--h5--FontWeight: var(--pf-t--global--font--weight--heading--default); |
| 51 |
|
| 52 |
// h6 |
| 53 |
--#{$content}--h6--MarginBlockStart: var(--pf-t--global--spacer--lg); |
| 54 |
--#{$content}--h6--MarginBlockEnd: var(--pf-t--global--spacer--sm); |
| 55 |
--#{$content}--h6--LineHeight: var(--pf-t--global--font--line-height--heading); |
| 56 |
--#{$content}--h6--FontSize: var(--pf-t--global--font--size--heading--h6); |
| 57 |
--#{$content}--h6--FontWeight: var(--pf-t--global--font--weight--heading--default); |
| 58 |
|
| 59 |
// Page title |
| 60 |
--#{$content}--heading--m-page-title--FontWeight: var(--pf-t--global--font--weight--heading--bold); |
| 61 |
|
| 62 |
// Small text |
| 63 |
--#{$content}--small--MarginBlockEnd: var(--pf-t--global--spacer--md); |
| 64 |
--#{$content}--small--LineHeight: var(--pf-t--global--font--line-height--body); |
| 65 |
--#{$content}--small--FontSize: var(--pf-t--global--font--size--body--sm); |
| 66 |
--#{$content}--m-editorial--small--FontSize: var(--pf-t--global--font--size--body--default); |
| 67 |
--#{$content}--small--Color: var(--pf-t--global--text--color--subtle); |
| 68 |
|
| 69 |
// Links |
| 70 |
--#{$content}--a--Color: var(--pf-t--global--text--color--link--default); |
| 71 |
--#{$content}--a--TextDecorationLine: var(--pf-t--global--text-decoration--link--line--default); |
| 72 |
--#{$content}--a--TextDecorationStyle: var(--pf-t--global--text-decoration--link--style--default); |
| 73 |
--#{$content}--a--hover--Color: var(--pf-t--global--text--color--link--hover); |
| 74 |
--#{$content}--a--hover--TextDecorationLine: var(--pf-t--global--text-decoration--link--line--hover); |
| 75 |
--#{$content}--a--hover--TextDecorationStyle: var(--pf-t--global--text-decoration--link--style--hover); |
| 76 |
--#{$content}--a--visited--Color: var(--pf-t--global--text--color--link--visited); |
| 77 |
|
| 78 |
// Blockquote |
| 79 |
--#{$content}--blockquote--PaddingBlockStart: var(--pf-t--global--spacer--md); |
| 80 |
--#{$content}--blockquote--PaddingInlineEnd: var(--pf-t--global--spacer--md); |
| 81 |
--#{$content}--blockquote--PaddingBlockEnd: var(--pf-t--global--spacer--md); |
| 82 |
--#{$content}--blockquote--PaddingInlineStart: var(--pf-t--global--spacer--md); |
| 83 |
--#{$content}--blockquote--Color: var(--pf-t--global--text--color--subtle); |
| 84 |
--#{$content}--blockquote--BorderInlineStartColor: var(--pf-t--global--border--color--default); |
| 85 |
--#{$content}--blockquote--BorderInlineStartWidth: var(--pf-t--global--border--width--300); // TODO semantic value? |
| 86 |
|
| 87 |
// Lists |
| 88 |
--#{$content}--list--Gap: var(--pf-t--global--spacer--sm); |
| 89 |
--#{$content}--list--PaddingInlineStart: var(--pf-t--global--spacer--lg); |
| 90 |
--#{$content}--list--nested--MarginBlockStart: var(--#{$content}--list--Gap); |
| 91 |
--#{$content}--ul--ListStyle: var(--pf-t--global--list-style); |
| 92 |
--#{$content}--dl--GridTemplateColumns--dt: 12ch; |
| 93 |
--#{$content}--dl--GridTemplateColumns--dd: 1fr; |
| 94 |
--#{$content}--dl--ColumnGap: var(--pf-t--global--spacer--gap--group--horizontal); |
| 95 |
--#{$content}--dl--RowGap: var(--pf-t--global--spacer--gap--group-to-group--vertical--default); |
| 96 |
--#{$content}--dt--FontWeight: var(--pf-t--global--font--weight--body--bold); |
| 97 |
--#{$content}--dt--MarginBlockStart: var(--pf-t--global--spacer--md); |
| 98 |
--#{$content}--dt--sm--MarginBlockStart: 0; |
| 99 |
|
| 100 |
// hr |
| 101 |
--#{$content}--hr--Height: var(--pf-t--global--border--width--divider--default); |
| 102 |
--#{$content}--hr--BackgroundColor: var(--pf-t--global--border--color--default); |
| 103 |
} |
| 104 |
|
| 105 |
[class*="#{$content}"] { |
| 106 |
font-size: var(--#{$content}--FontSize); |
| 107 |
line-height: var(--#{$content}--LineHeight); |
| 108 |
color: var(--#{$content}--Color); |
| 109 |
|
| 110 |
&.pf-m-editorial { |
| 111 |
--#{$content}--FontSize: var(--#{$content}--m-editorial--FontSize); |
| 112 |
--#{$content}--small--FontSize: var(--#{$content}--m-editorial--small--FontSize); |
| 113 |
} |
| 114 |
} |
| 115 |
|
| 116 |
.#{$content} { |
| 117 |
@at-root :is( |
| 118 |
.#{$content}--a, |
| 119 |
& a |
| 120 |
) { |
| 121 |
color: var(--#{$content}--a--Color); |
| 122 |
text-decoration-line: var(--#{$content}--a--TextDecorationLine); |
| 123 |
text-decoration-style: var(--#{$content}--a--TextDecorationStyle); |
| 124 |
|
| 125 |
&:is(:hover, :focus) { |
| 126 |
--#{$content}--a--Color: var(--#{$content}--a--hover--Color); |
| 127 |
--#{$content}--a--TextDecorationLine: var(--#{$content}--a--hover--TextDecorationLine); |
| 128 |
--#{$content}--a--TextDecorationStyle: var(--#{$content}--a--hover--TextDecorationStyle); |
| 129 |
} |
| 130 |
} |
| 131 |
|
| 132 |
// stylelint-disable selector-no-qualifying-type |
| 133 |
@at-root :is( |
| 134 |
.#{$content}--a.pf-m-visited, |
| 135 |
&.pf-m-visited a, |
| 136 |
& a.pf-m-visited |
| 137 |
) { |
| 138 |
&:visited { |
| 139 |
color: var(--#{$content}--a--visited--Color); |
| 140 |
} |
| 141 |
} |
| 142 |
// stylelint-enable |
| 143 |
|
| 144 |
@at-root :is( |
| 145 |
.#{$content}--li + .#{$content}--li, |
| 146 |
& li + li |
| 147 |
) { |
| 148 |
margin-block-start: var(--#{$content}--li--MarginBlockStart); |
| 149 |
} |
| 150 |
|
| 151 |
@at-root :is( |
| 152 |
.#{$content}--p, |
| 153 |
.#{$content}--dl, |
| 154 |
.#{$content}--ol, |
| 155 |
.#{$content}--ul, |
| 156 |
.#{$content}--blockquote, |
| 157 |
.#{$content}--small, |
| 158 |
.#{$content}--pre, |
| 159 |
.#{$content}--table, |
| 160 |
.#{$content}--hr, |
| 161 |
& p, |
| 162 |
& dl, |
| 163 |
& ol, |
| 164 |
& ul, |
| 165 |
& blockquote, |
| 166 |
& small, |
| 167 |
& pre, |
| 168 |
& table, |
| 169 |
& hr |
| 170 |
) { |
| 171 |
&:not(:last-child) { |
| 172 |
// This variable name doesn't reflect the selector, it's an excpection to the variable system. |
| 173 |
margin-block-end: var(--#{$content}--MarginBlockEnd); |
| 174 |
} |
| 175 |
} |
| 176 |
|
| 177 |
@at-root :is( |
| 178 |
.#{$content}--h1, |
| 179 |
.#{$content}--h2, |
| 180 |
.#{$content}--h3, |
| 181 |
.#{$content}--h4, |
| 182 |
.#{$content}--h5, |
| 183 |
.#{$content}--h6, |
| 184 |
& h1, |
| 185 |
& h2, |
| 186 |
& h3, |
| 187 |
& h4, |
| 188 |
& h5, |
| 189 |
& h6 |
| 190 |
) { |
| 191 |
margin: 0; |
| 192 |
font-family: var(--#{$content}--heading--FontFamily); |
| 193 |
|
| 194 |
&:first-child { |
| 195 |
margin-block-start: 0; |
| 196 |
} |
| 197 |
|
| 198 |
&:last-child { |
| 199 |
margin-block-end: 0; |
| 200 |
} |
| 201 |
|
| 202 |
&.pf-m-page-title { |
| 203 |
font-weight: var(--#{$content}--heading--m-page-title--FontWeight); |
| 204 |
} |
| 205 |
} |
| 206 |
|
| 207 |
@at-root :is( |
| 208 |
.#{$content}--h1, |
| 209 |
& h1 |
| 210 |
) { |
| 211 |
margin-block-start: var(--#{$content}--h1--MarginBlockStart); |
| 212 |
margin-block-end: var(--#{$content}--h1--MarginBlockEnd); |
| 213 |
font-size: var(--#{$content}--h1--FontSize); |
| 214 |
font-weight: var(--#{$content}--h1--FontWeight); |
| 215 |
line-height: var(--#{$content}--h1--LineHeight); |
| 216 |
} |
| 217 |
|
| 218 |
@at-root :is( |
| 219 |
.#{$content}--h2, |
| 220 |
& h2 |
| 221 |
) { |
| 222 |
margin-block-start: var(--#{$content}--h2--MarginBlockStart); |
| 223 |
margin-block-end: var(--#{$content}--h2--MarginBlockEnd); |
| 224 |
font-size: var(--#{$content}--h2--FontSize); |
| 225 |
font-weight: var(--#{$content}--h2--FontWeight); |
| 226 |
line-height: var(--#{$content}--h2--LineHeight); |
| 227 |
} |
| 228 |
|
| 229 |
@at-root :is( |
| 230 |
.#{$content}--h3, |
| 231 |
& h3 |
| 232 |
) { |
| 233 |
margin-block-start: var(--#{$content}--h3--MarginBlockStart); |
| 234 |
margin-block-end: var(--#{$content}--h3--MarginBlockEnd); |
| 235 |
font-size: var(--#{$content}--h3--FontSize); |
| 236 |
font-weight: var(--#{$content}--h3--FontWeight); |
| 237 |
line-height: var(--#{$content}--h3--LineHeight); |
| 238 |
} |
| 239 |
|
| 240 |
@at-root :is( |
| 241 |
.#{$content}--h4, |
| 242 |
& h4 |
| 243 |
) { |
| 244 |
margin-block-start: var(--#{$content}--h4--MarginBlockStart); |
| 245 |
margin-block-end: var(--#{$content}--h4--MarginBlockEnd); |
| 246 |
font-size: var(--#{$content}--h4--FontSize); |
| 247 |
font-weight: var(--#{$content}--h4--FontWeight); |
| 248 |
line-height: var(--#{$content}--h4--LineHeight); |
| 249 |
} |
| 250 |
|
| 251 |
@at-root :is( |
| 252 |
.#{$content}--h5, |
| 253 |
& h5 |
| 254 |
) { |
| 255 |
margin-block-start: var(--#{$content}--h5--MarginBlockStart); |
| 256 |
margin-block-end: var(--#{$content}--h5--MarginBlockEnd); |
| 257 |
font-size: var(--#{$content}--h5--FontSize); |
| 258 |
font-weight: var(--#{$content}--h5--FontWeight); |
| 259 |
line-height: var(--#{$content}--h5--LineHeight); |
| 260 |
} |
| 261 |
|
| 262 |
@at-root :is( |
| 263 |
.#{$content}--h6, |
| 264 |
& h6 |
| 265 |
) { |
| 266 |
margin-block-start: var(--#{$content}--h6--MarginBlockStart); |
| 267 |
margin-block-end: var(--#{$content}--h6--MarginBlockEnd); |
| 268 |
font-size: var(--#{$content}--h6--FontSize); |
| 269 |
font-weight: var(--#{$content}--h6--FontWeight); |
| 270 |
line-height: var(--#{$content}--h6--LineHeight); |
| 271 |
} |
| 272 |
|
| 273 |
@at-root :is( |
| 274 |
.#{$content}--small, |
| 275 |
& small |
| 276 |
) { |
| 277 |
display: block; |
| 278 |
font-size: var(--#{$content}--small--FontSize); |
| 279 |
line-height: var(--#{$content}--small--LineHeight); |
| 280 |
color: var(--#{$content}--small--Color); |
| 281 |
|
| 282 |
&:not(:last-child) { |
| 283 |
margin-block-end: var(--#{$content}--small--MarginBlockEnd); |
| 284 |
} |
| 285 |
} |
| 286 |
|
| 287 |
@at-root :is( |
| 288 |
.#{$content}--blockquote, |
| 289 |
& blockquote |
| 290 |
) { |
| 291 |
padding-block-start: var(--#{$content}--blockquote--PaddingBlockStart); |
| 292 |
padding-block-end: var(--#{$content}--blockquote--PaddingBlockEnd); |
| 293 |
padding-inline-start: var(--#{$content}--blockquote--PaddingInlineStart); |
| 294 |
padding-inline-end: var(--#{$content}--blockquote--PaddingInlineEnd); |
| 295 |
color: var(--#{$content}--blockquote--Color); |
| 296 |
border-inline-start: var(--#{$content}--blockquote--BorderInlineStartWidth) solid var(--#{$content}--blockquote--BorderInlineStartColor); |
| 297 |
} |
| 298 |
|
| 299 |
@at-root :is( |
| 300 |
.#{$content}--hr, |
| 301 |
& hr |
| 302 |
) { |
| 303 |
height: var(--#{$content}--hr--Height); |
| 304 |
background-color: var(--#{$content}--hr--BackgroundColor); |
| 305 |
border: none; |
| 306 |
} |
| 307 |
|
| 308 |
@at-root :is( |
| 309 |
.#{$content}--ol, |
| 310 |
.#{$content}--ul, |
| 311 |
& ol, |
| 312 |
& ul |
| 313 |
) { |
| 314 |
display: flex; |
| 315 |
flex-direction: column; |
| 316 |
gap: var(--#{$content}--list--Gap); |
| 317 |
padding-inline-start: var(--#{$content}--list--PaddingInlineStart); |
| 318 |
|
| 319 |
&.pf-m-plain { |
| 320 |
padding-inline-start: 0; |
| 321 |
list-style: none; |
| 322 |
} |
| 323 |
|
| 324 |
:is( |
| 325 |
.#{$content}--ol, |
| 326 |
.#{$content}--ul, |
| 327 |
ol, |
| 328 |
ul |
| 329 |
) { |
| 330 |
margin-block-start: var(--#{$content}--list--nested--MarginBlockStart); |
| 331 |
} |
| 332 |
} |
| 333 |
|
| 334 |
@at-root :is( |
| 335 |
.#{$content}--ul, |
| 336 |
& ul |
| 337 |
) { |
| 338 |
list-style: var(--#{$content}--ul--ListStyle); |
| 339 |
} |
| 340 |
|
| 341 |
@at-root :is( |
| 342 |
.#{$content}--dl, |
| 343 |
& dl |
| 344 |
) { |
| 345 |
display: grid; |
| 346 |
grid-template-columns: 1fr; |
| 347 |
|
| 348 |
@media screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 349 |
grid-template: auto / var(--#{$content}--dl--GridTemplateColumns--dt) var(--#{$content}--dl--GridTemplateColumns--dd); |
| 350 |
row-gap: var(--#{$content}--dl--RowGap); |
| 351 |
column-gap: var(--#{$content}--dl--ColumnGap); |
| 352 |
} |
| 353 |
} |
| 354 |
|
| 355 |
@at-root :is( |
| 356 |
.#{$content}--dt, |
| 357 |
& dt |
| 358 |
) { |
| 359 |
font-weight: var(--#{$content}--dt--FontWeight); |
| 360 |
|
| 361 |
&:not(:first-child) { |
| 362 |
margin-block-start: var(--#{$content}--dt--MarginBlockStart); |
| 363 |
|
| 364 |
@media screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 365 |
--#{$content}--dt--MarginBlockStart: var(--#{$content}--dt--sm--MarginBlockStart); |
| 366 |
} |
| 367 |
} |
| 368 |
|
| 369 |
@media screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 370 |
grid-column: 1; |
| 371 |
} |
| 372 |
} |
| 373 |
|
| 374 |
@at-root :is( |
| 375 |
.#{$content}--dd, |
| 376 |
& dd |
| 377 |
) { |
| 378 |
@media screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 379 |
grid-column: 2; |
| 380 |
} |
| 381 |
} |
| 382 |
} |