1
0
mirror of synced 2026-01-08 03:01:54 -05:00
Files
docs/stylesheets/utilities.scss
2023-06-28 17:13:36 +00:00

239 lines
4.2 KiB
SCSS

.color-unset {
color: unset;
}
.line-break-anywhere {
line-break: anywhere;
}
.transition-200 {
transition: 200ms;
}
.rotate-180 {
transform: rotateX(180deg);
}
.outline-none {
outline: none;
}
/* Print utilities
------------------------------------------------------------------------------*/
@media print {
.no-print {
display: none;
}
}
/* Opacity utilities
------------------------------------------------------------------------------*/
.opacity-0 {
opacity: 0;
}
.opacity-60 {
opacity: 0.6;
}
.opacity-70 {
opacity: 0.7;
}
.opacity-100 {
opacity: 1;
}
/* List utilities
------------------------------------------------------------------------------*/
.list-style-inside {
list-style: inside;
}
/* Hover utilities
------------------------------------------------------------------------------*/
.hover\:color-bg-accent:hover {
background: var(--color-accent-subtle);
}
/* Z-Index utilities
------------------------------------------------------------------------------*/
.-z-1 {
z-index: -1;
}
.z-1 {
z-index: 1;
}
.z-2 {
z-index: 2;
}
.z-3 {
z-index: 3;
}
/* Border colors
------------------------------------------------------------------------------*/
.color-border-transparent {
border-color: transparent !important;
}
/* Background colors
------------------------------------------------------------------------------*/
.background-transparent {
background-color: transparent;
}
/* Widths / Heights
------------------------------------------------------------------------------*/
.max-w-xs {
max-width: 20rem;
}
.min-h-screen {
min-height: 100vh;
}
.visually-hidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
width: 1px;
}
/* Screen Reader Only
------------------------------------------------------------------------------*/
.sr-only {
position: absolute;
top: -100px;
left: 0;
width: 1px;
height: 1px;
padding: 12px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
z-index: 101;
&:focus {
top: 0;
left: 0;
width: auto;
height: auto;
overflow: visible;
clip: auto;
white-space: normal;
}
}
/* Code annotations
----------------------------------------------------------------------------*/
.annotate.beside {
.annotate-beside {
display: inherit;
}
.annotate-inline {
display: none;
}
}
.annotate.inline {
.annotate-beside {
display: none;
}
.annotate-inline {
display: inherit;
}
}
.annotate {
pre {
border: 0px !important;
margin: 0px !important;
.hljs {
overflow-x: auto;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
}
}
.annotate-beside,
.beside .annotate-header {
margin: auto;
@include breakpoint(md) {
// 720px: content width, 4rem padding
margin: 0 calc((100vw - 720px - 4rem) / 2 * -1);
}
@include breakpoint(xl) {
// 326px: navigation width
margin: 0 max(-12rem, calc((100vw - 720px - 326px - 4rem) / 2 * -1));
}
}
.beside .annotate-header header {
width: auto;
@include breakpoint(md) {
width: 50%;
}
}
.annotate-beside > div:last-child > .annotate-code {
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
border-bottom: 1px solid var(--color-border-default);
}
.annotate-inline {
border-left: 1px solid var(--color-border-default);
border-right: 1px solid var(--color-border-default);
border-bottom: 1px solid var(--color-border-default);
}
.annotate-row {
display: flex;
flex-direction: column;
@include breakpoint(md) {
flex-direction: row;
margin: 0 auto;
&:hover {
border-radius: 4px;
outline: 2px solid var(--color-accent-fg);
}
}
}
.annotate-code {
background-color: var(--color-canvas-subtle);
border-left: 1px solid var(--color-border-default);
border-right: 1px solid var(--color-border-default);
@include breakpoint(md) {
width: 50%;
}
}
.annotate-note {
@include breakpoint(md) {
width: 50%;
padding: 16px 0 16px 16px;
font-size: 14px;
}
}
.subnav-item[aria-current]:not([aria-current="false"]) {
z-index: 0;
}