mirror of
https://github.com/tabler/tabler.git
synced 2026-08-28 12:56:24 +04:00
- Mounted in BaseLayout, so the shortcut works on every page - Navbar and sidebar search now open the palette instead of a dead form
180 lines
3.0 KiB
SCSS
180 lines
3.0 KiB
SCSS
@use 'highlight';
|
|
|
|
.dropdown-menu-demo {
|
|
display: inline-block;
|
|
width: 100%;
|
|
position: relative;
|
|
top: 0;
|
|
margin-bottom: 1rem !important;
|
|
}
|
|
|
|
.demo-icon-preview {
|
|
position: sticky;
|
|
top: 0;
|
|
|
|
svg,
|
|
i {
|
|
width: 15rem;
|
|
height: 15rem;
|
|
font-size: 15rem;
|
|
stroke-width: 1.5;
|
|
margin: 0 auto;
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.demo-icon-preview-icon {
|
|
pre {
|
|
margin: 0;
|
|
user-select: all;
|
|
}
|
|
}
|
|
|
|
.demo-dividers {
|
|
> p {
|
|
opacity: 0.2;
|
|
user-select: none;
|
|
}
|
|
}
|
|
|
|
$demo-icon-size: 4rem;
|
|
.demo-icons-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
padding: 0;
|
|
margin: 0 -2px -1px 0;
|
|
list-style: none;
|
|
|
|
> * {
|
|
flex: 1 0 $demo-icon-size;
|
|
}
|
|
}
|
|
|
|
.demo-icons-list-wrap {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.demo-icons-list-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
aspect-ratio: 1;
|
|
text-align: center;
|
|
padding: 0.5rem;
|
|
border-right: var(--border-width) var(--border-style) var(--border-color);
|
|
border-bottom: var(--border-width) var(--border-style) var(--border-color);
|
|
color: inherit;
|
|
cursor: pointer;
|
|
|
|
.icon {
|
|
width: 1.5rem;
|
|
height: 1.5rem;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
&:hover {
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
|
|
//
|
|
// Command palette prototype (see shared/ui/CommandPalette.astro).
|
|
// Demo-only styles — nothing here is part of the core CSS API yet.
|
|
//
|
|
|
|
.command-palette-search {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
padding-inline: 1rem;
|
|
border-bottom: var(--border-width) var(--border-style) var(--border-color);
|
|
|
|
.form-control {
|
|
flex: 1 1 auto;
|
|
width: auto;
|
|
min-width: 0;
|
|
padding-inline: 0;
|
|
padding-block: 0.875rem;
|
|
font-size: 1rem;
|
|
}
|
|
}
|
|
|
|
.command-palette-search-icon {
|
|
display: flex;
|
|
color: var(--secondary);
|
|
}
|
|
|
|
.command-palette-list {
|
|
max-height: 60vh;
|
|
margin: 0;
|
|
padding: 0.5rem;
|
|
list-style: none;
|
|
}
|
|
|
|
.command-palette-group {
|
|
padding: 0.5rem 0.75rem 0.25rem;
|
|
font-size: 0.625rem;
|
|
font-weight: var(--font-weight-medium);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
color: var(--secondary);
|
|
}
|
|
|
|
.command-palette-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
padding: 0.5rem 0.75rem;
|
|
border-radius: var(--border-radius);
|
|
cursor: pointer;
|
|
|
|
&.active {
|
|
background: var(--active-bg);
|
|
}
|
|
|
|
mark {
|
|
padding: 0;
|
|
background: none;
|
|
font-weight: var(--font-weight-bold);
|
|
color: inherit;
|
|
}
|
|
}
|
|
|
|
.command-palette-item-icon {
|
|
display: flex;
|
|
color: var(--secondary);
|
|
}
|
|
|
|
.command-palette-item-title {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.command-palette-item-hint,
|
|
.command-palette-item-section {
|
|
font-size: 0.75rem;
|
|
color: var(--secondary);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.command-palette-item-section {
|
|
margin-inline-start: auto;
|
|
}
|
|
|
|
.command-palette-footer {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 1rem;
|
|
padding: 0.5rem 1rem;
|
|
border-top: var(--border-width) var(--border-style) var(--border-color);
|
|
font-size: 0.75rem;
|
|
color: var(--secondary);
|
|
}
|
|
|
|
.command-palette-kbd {
|
|
font-size: 0.625rem;
|
|
}
|