Files
tabler/core/scss/_extends.scss
T

88 lines
1.7 KiB
SCSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Cross-module `@extend` rules, loaded last from `tabler.scss`.
//
// With the Sass module system an extension only applies to upstream
// stylesheets — the modules the extending file loads, directly or
// transitively — never to sibling modules loaded elsewhere. The extends below
// target element selectors spread across many modules (`h1``h6`, `hr`,
// `.table`, `[data-bs-theme='dark']`), so they live here, with the whole
// `core` upstream.
//
// Rules containing only `@extend` emit no CSS of their own, so placing them
// here does not change the compiled output — each extension is applied
// in-place to the rules it extends.
@use 'config' as *;
@use 'core';
// Heading helpers (from `bootstrap/_type.scss`)
.h1 {
@extend h1;
}
.h2 {
@extend h2;
}
.h3 {
@extend h3;
}
.h4 {
@extend h4;
}
.h5 {
@extend h5;
}
.h6 {
@extend h6;
}
// Emphasis helpers (from `bootstrap/_type.scss`)
.small {
@extend small;
}
.mark {
@extend mark;
}
// Horizontal rule helper (from `ui/typo/_hr.scss`)
.hr {
@extend hr;
}
// Markdown tables pick up the styled table look (from `ui/_markdown.scss`)
.prose > table,
.markdown > table {
@extend .table;
font-size: var(--body-font-size);
th:first-child,
td:first-child {
padding-left: 0;
}
th:last-child,
td:last-child {
padding-right: 0;
}
tr:last-child > * {
border-bottom: 0;
}
th {
--bg-surface-tertiary: transparent;
}
}
// Light-scoped subtrees inside a dark body inherit the dark styles
// (from `layout/_dark.scss`)
@if $enable-dark-mode {
body[data-bs-theme='dark'] [data-bs-theme='light'],
body[data-theme='dark'] [data-theme='light'] {
@extend [data-bs-theme='dark'];
}
}