mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
145 lines
2.3 KiB
SCSS
145 lines
2.3 KiB
SCSS
@use 'sass:map';
|
|
|
|
//
|
|
// Clearfix
|
|
//
|
|
.clearfix {
|
|
@include clearfix();
|
|
}
|
|
|
|
//
|
|
// Text truncation
|
|
//
|
|
.text-truncate {
|
|
@include text-truncate();
|
|
}
|
|
|
|
//
|
|
// Vertical rule
|
|
//
|
|
.vr {
|
|
display: inline-block;
|
|
align-self: stretch;
|
|
width: $vr-border-width;
|
|
min-height: 1em;
|
|
background-color: currentcolor;
|
|
opacity: $hr-opacity;
|
|
}
|
|
|
|
//
|
|
// Stretched link
|
|
//
|
|
.stretched-link {
|
|
&::after {
|
|
position: absolute;
|
|
top: 0;
|
|
inset-inline-end: 0;
|
|
bottom: 0;
|
|
inset-inline-start: 0;
|
|
z-index: 1;
|
|
content: '';
|
|
}
|
|
}
|
|
|
|
//
|
|
// Visually hidden
|
|
//
|
|
.visually-hidden,
|
|
.visually-hidden-focusable:not(:focus):not(:focus-within) {
|
|
@include visually-hidden();
|
|
}
|
|
|
|
//
|
|
// Stacks
|
|
//
|
|
.hstack {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
align-self: stretch;
|
|
}
|
|
|
|
.vstack {
|
|
display: flex;
|
|
flex: 1 1 auto;
|
|
flex-direction: column;
|
|
align-self: stretch;
|
|
}
|
|
|
|
//
|
|
// Position
|
|
//
|
|
// Shorthand
|
|
|
|
.fixed-top {
|
|
position: fixed;
|
|
top: 0;
|
|
inset-inline-end: 0;
|
|
inset-inline-start: 0;
|
|
z-index: $zindex-fixed;
|
|
}
|
|
|
|
.fixed-bottom {
|
|
position: fixed;
|
|
inset-inline-end: 0;
|
|
bottom: 0;
|
|
inset-inline-start: 0;
|
|
z-index: $zindex-fixed;
|
|
}
|
|
|
|
// Responsive sticky top and bottom
|
|
@each $breakpoint in map.keys($grid-breakpoints) {
|
|
@include media-breakpoint-up($breakpoint) {
|
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
|
|
|
.sticky#{$infix}-top {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: $zindex-sticky;
|
|
}
|
|
|
|
.sticky#{$infix}-bottom {
|
|
position: sticky;
|
|
bottom: 0;
|
|
z-index: $zindex-sticky;
|
|
}
|
|
}
|
|
}
|
|
|
|
//
|
|
// Aspect ratio
|
|
//
|
|
.ratio {
|
|
position: relative;
|
|
width: 100%;
|
|
|
|
&::before {
|
|
display: block;
|
|
padding-top: var(--#{$prefix}aspect-ratio);
|
|
content: '';
|
|
}
|
|
|
|
> * {
|
|
position: absolute;
|
|
top: 0;
|
|
inset-inline-start: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
@each $key, $ratio in $aspect-ratios {
|
|
.ratio-#{$key} {
|
|
--#{$prefix}aspect-ratio: #{$ratio};
|
|
}
|
|
}
|
|
|
|
//
|
|
// Focus ring
|
|
//
|
|
.focus-ring:focus {
|
|
outline: 0;
|
|
// By default, there is no `--bs-focus-ring-x`, `--bs-focus-ring-y`, or `--bs-focus-ring-blur`, but we provide CSS variables with fallbacks to initial `0` values
|
|
box-shadow: var(--#{$prefix}focus-ring-x, 0) var(--#{$prefix}focus-ring-y, 0) var(--#{$prefix}focus-ring-blur, 0) var(--#{$prefix}focus-ring-width) var(--#{$prefix}focus-ring-color);
|
|
}
|