bfloydd_coalesce/styles/components/header.css
2025-12-16 15:32:14 -07:00

590 lines
No EOL
14 KiB
CSS

/* ============================
Coalesce Header Component Styles
============================ */
/* Header container and layout */
.coalesce-backlinks-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 0;
padding: 8px 12px;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
box-sizing: border-box;
background: transparent;
border: none;
border-bottom: 1px solid var(--background-modifier-border);
border-radius: 0;
/* Performance optimization */
will-change: transform;
transform: translateZ(0);
}
.coalesce-backlinks-header-left {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
min-width: 0;
flex: 1;
}
.coalesce-backlinks-header-right {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: nowrap;
}
/* Button group - icon transforms removed since we use different icons for collapsed/expanded states */
.coalesce-button-group svg.sort-ascending {
transform: rotate(180deg);
}
.coalesce-button-group svg.sort-descending {
transform: none;
}
.coalesce-button-group {
display: flex;
align-items: center;
white-space: nowrap;
margin-left: 0;
gap: 2px;
background: var(--background-secondary-alt);
border-radius: var(--coalesce-radius-sm, 4px);
padding: 2px;
}
.coalesce-button-group > *,
.coalesce-button-group .extra-setting-item,
.coalesce-button-group .clickable-icon {
--icon-size: var(--coalesce-icon-size-sm) !important;
}
.coalesce-button-group > * svg,
.coalesce-button-group .extra-setting-item svg,
.coalesce-button-group .clickable-icon svg {
width: var(--coalesce-icon-size-sm) !important;
height: var(--coalesce-icon-size-sm) !important;
}
/* Header buttons */
.coalesce-sort-button,
.coalesce-collapse-button,
.coalesce-settings-button,
.coalesce-refresh-button {
background: transparent;
border: none;
padding: 6px 8px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted);
border-radius: var(--coalesce-radius-sm, 4px);
transition: all 0.2s ease;
min-height: 28px;
min-width: 28px;
}
.coalesce-sort-button {
gap: 6px;
font-size: var(--font-ui-smaller);
font-weight: 500;
padding: 6px 10px;
min-width: auto;
}
.coalesce-sort-button:hover,
.coalesce-collapse-button:hover,
.coalesce-settings-button:hover,
.coalesce-refresh-button:hover {
background-color: var(--background-modifier-hover);
color: var(--text-normal);
transform: translateY(-1px);
}
.coalesce-sort-button:active,
.coalesce-collapse-button:active,
.coalesce-settings-button:active,
.coalesce-refresh-button:active {
background-color: var(--background-modifier-active);
transform: translateY(0);
}
/* Settings popup */
.coalesce-settings-popup {
position: fixed;
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: var(--coalesce-radius-md);
padding: var(--coalesce-spacing-md) 0;
z-index: 1000;
box-shadow: var(--coalesce-shadow-sm);
min-width: 180px;
max-height: 80vh;
overflow-y: auto;
color: var(--text-normal);
top: 0;
right: 0;
font-size: 14px;
}
.coalesce-settings-item {
display: flex;
align-items: center;
padding: 2px 8px;
cursor: pointer;
position: relative;
user-select: none;
color: var(--text-normal);
font-size: 14px;
height: 26px;
padding-left: 8px;
gap: 4px;
}
.coalesce-settings-item:hover {
background-color: var(--background-modifier-hover);
}
.coalesce-setting-item-icon {
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
color: var(--text-muted);
margin-right: 6px;
flex-shrink: 0;
}
.coalesce-settings-header .coalesce-setting-item-icon {
color: var(--text-faint);
}
.coalesce-setting-item-label {
flex: 1;
margin-left: 4px;
color: var(--text-normal);
font-size: 14px;
}
/* Obsidian-style section headers */
.coalesce-settings-header {
cursor: default !important;
color: var(--text-faint);
font-size: 12px;
padding: 2px 8px;
margin-top: 4px;
font-weight: 600;
height: auto;
display: flex;
align-items: center;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.coalesce-settings-header:hover {
background-color: transparent !important;
}
.coalesce-settings-header:first-child {
margin-top: 0;
}
.coalesce-menu-separator {
height: 1px;
background-color: var(--background-modifier-border);
margin: 4px 0;
}
.coalesce-settings-popup .coalesce-menu-separator {
margin: 2px 0;
}
/* Alias dropdown */
.coalesce-alias-dropdown {
font-size: var(--font-ui-smaller);
min-width: 130px;
max-width: 130px;
height: 28px;
flex-shrink: 1;
text-overflow: ellipsis;
background-color: var(--background-modifier-form, var(--background-primary));
border: 1px solid var(--background-modifier-border);
border-radius: var(--coalesce-radius-sm, 4px);
padding: 4px 8px;
transition: all 0.2s ease;
color: var(--text-normal);
cursor: pointer;
}
.coalesce-alias-dropdown:hover {
background-color: var(--background-modifier-form-highlight, var(--background-secondary-alt));
border-color: var(--background-modifier-border-hover);
}
.coalesce-alias-dropdown:focus {
outline: none;
border-color: var(--interactive-accent);
background-color: var(--background-modifier-form-highlight, var(--background-secondary-alt));
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.15);
}
.is-mobile .coalesce-alias-dropdown,
.is-phone .coalesce-alias-dropdown {
min-width: 100px;
font-size: var(--font-ui-smallest);
padding: 2px 4px;
height: 20px;
}
.coalesce-alias-dropdown:hover {
border-color: var(--background-modifier-border-hover);
}
.coalesce-alias-dropdown:focus {
outline: none;
border-color: var(--interactive-accent);
}
.coalesce-alias-dropdown:disabled {
opacity: 0.7;
cursor: not-allowed;
border-color: var(--background-modifier-border);
}
/* Filter input component */
.coalesce-filter-input-container {
position: relative;
display: flex;
align-items: center;
margin: 0;
min-width: 120px;
flex-shrink: 1;
}
.coalesce-filter-input {
padding: 6px 10px;
padding-right: 32px;
border-radius: var(--coalesce-radius-sm, 4px);
border: 1px solid var(--background-modifier-border);
background-color: var(--background-modifier-form, var(--background-primary));
color: var(--text-normal);
font-size: var(--font-ui-smaller);
min-width: 140px;
height: 28px;
flex-shrink: 1;
text-overflow: ellipsis;
transition: all 0.2s ease;
will-change: border-color, box-shadow;
transform: translateZ(0);
position: relative;
z-index: 1;
box-sizing: border-box;
min-height: 28px;
min-width: 100px;
margin: 0;
background-clip: padding-box;
}
.coalesce-filter-input::placeholder {
color: var(--text-muted);
opacity: 0.7;
}
.coalesce-filter-input:hover {
border-color: var(--background-modifier-border-hover);
background-color: var(--background-modifier-form-highlight, var(--background-secondary-alt));
}
.coalesce-filter-input:not([disabled]) {
pointer-events: auto;
user-select: text;
position: relative;
z-index: 10;
}
.coalesce-filter-input:focus {
outline: none;
border-color: var(--interactive-accent);
background-color: var(--background-modifier-form-highlight, var(--background-secondary-alt));
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.15);
position: relative;
z-index: 10;
}
.coalesce-filter-clear-button {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
background: transparent;
border: none;
padding: 0;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted);
border-radius: 50%;
width: 18px;
height: 18px;
min-width: 18px;
min-height: 18px;
max-width: 18px;
max-height: 18px;
opacity: 0;
transition: all 0.2s ease;
z-index: 10;
pointer-events: auto;
box-sizing: border-box;
flex-shrink: 0;
flex-grow: 0;
}
.coalesce-filter-clear-button:hover {
background-color: var(--background-modifier-hover);
color: var(--text-normal);
}
.coalesce-filter-clear-button:active {
background-color: var(--background-modifier-active);
transform: translateY(-50%) scale(0.95);
}
.coalesce-filter-input-container.has-value .coalesce-filter-clear-button {
opacity: 1;
}
.coalesce-filter-clear-button svg {
width: 10px;
height: 10px;
stroke: currentColor;
stroke-width: 1.5;
fill: none;
display: block;
}
.coalesce-backlinks-header:focus-within .coalesce-filter-input {
position: relative;
z-index: 10;
}
.is-mobile .coalesce-filter-input-container,
.is-phone .coalesce-filter-input-container {
min-width: 100px;
}
.is-mobile .coalesce-filter-input,
.is-phone .coalesce-filter-input {
min-width: 100px;
font-size: var(--font-ui-smallest);
padding: 2px 4px;
padding-right: 24px;
height: 20px;
min-height: 20px;
}
/* Responsive layout */
.is-phone .coalesce-backlinks-header,
.is-mobile .coalesce-backlinks-header {
flex-direction: row;
align-items: center;
gap: 4px;
padding: 8px;
}
.is-phone .coalesce-backlinks-header-left,
.is-mobile .coalesce-backlinks-header-left {
width: auto;
justify-content: flex-start;
flex: 1;
gap: 4px;
}
.is-phone .coalesce-backlinks-header-right,
.is-mobile .coalesce-backlinks-header-right {
width: auto;
justify-content: flex-end;
}
.is-phone .coalesce-button-group,
.is-mobile .coalesce-button-group {
margin-left: 4px;
display: flex;
gap: 2px;
}
.is-phone .coalesce-alias-dropdown,
.is-mobile .coalesce-alias-dropdown {
min-width: 80px;
max-width: 120px;
font-size: var(--font-ui-smaller);
padding: 2px 4px;
height: 24px;
}
.is-phone .coalesce-filter-input,
.is-mobile .coalesce-filter-input {
min-width: 80px;
max-width: 120px;
font-size: var(--font-ui-smaller);
padding: 2px 4px;
height: 24px;
}
@media (max-width: 400px) {
.coalesce-backlinks-header {
flex-direction: row;
align-items: center;
gap: 4px;
padding: 8px;
}
.coalesce-backlinks-header-left {
width: auto;
justify-content: flex-start;
flex: 1;
gap: 4px;
}
.coalesce-backlinks-header-right {
width: auto;
justify-content: flex-end;
}
.coalesce-alias-dropdown {
min-width: 80px;
max-width: 120px;
margin: 0 4px;
}
.coalesce-filter-input-container {
min-width: 80px;
max-width: 120px;
margin: 0 4px;
}
.coalesce-filter-input {
min-width: 80px;
max-width: 120px;
margin: 0;
padding-right: 24px; /* Smaller padding for very small screens */
}
.coalesce-button-group {
margin-left: 4px;
display: flex;
gap: 2px;
}
}
@media (max-width: 600px) and (min-width: 401px) {
.coalesce-backlinks-header-left {
flex-wrap: nowrap;
gap: 4px;
}
.coalesce-button-group {
margin-left: 4px;
}
}
/* Compact header variants */
.coalesce-backlinks-header.compact {
padding: 6px 8px;
gap: 6px;
}
.coalesce-backlinks-header.compact .coalesce-button-group {
margin-left: 0;
gap: 2px;
padding: 1px;
}
/* Settings popup checkmarks */
.coalesce-settings-item[data-style] .coalesce-checkmark-container,
.coalesce-settings-item[data-position] .coalesce-checkmark-container,
.coalesce-settings-item[data-strategy] .coalesce-checkmark-container,
.coalesce-settings-item[data-theme] .coalesce-checkmark-container {
margin-left: auto;
}
.coalesce-settings-item[data-style] .coalesce-checkmark-container .coalesce-checkmark,
.coalesce-settings-item[data-position] .coalesce-checkmark-container .coalesce-checkmark,
.coalesce-settings-item[data-strategy] .coalesce-checkmark-container .coalesce-checkmark,
.coalesce-settings-item[data-theme] .coalesce-checkmark-container .coalesce-checkmark {
display: none;
}
.coalesce-settings-item[data-style] .coalesce-checkmark-container.is-checked .coalesce-checkmark,
.coalesce-settings-item[data-position] .coalesce-checkmark-container.is-checked .coalesce-checkmark,
.coalesce-settings-item[data-strategy] .coalesce-checkmark-container.is-checked .coalesce-checkmark,
.coalesce-settings-item[data-theme] .coalesce-checkmark-container.is-checked .coalesce-checkmark {
display: block;
}
.coalesce-settings-submenu-item {
padding-left: 24px;
}
/* Sort/Collapse icon sizes inside header */
.coalesce-backlinks-header .coalesce-button-group .coalesce-sort-button svg,
.coalesce-backlinks-header .coalesce-button-group .coalesce-collapse-button svg {
width: var(--coalesce-icon-size-md);
height: var(--coalesce-icon-size-md);
}
/* ============================
Shared UI primitives
============================ */
/* Base button styles used by src/shared/ui/Button.ts */
.coalesce-btn,
.coalesce-icon-button {
border: none;
background: transparent;
color: var(--text-muted);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-radius: var(--coalesce-radius-sm, 4px);
padding: var(--coalesce-spacing-sm, 4px) var(--coalesce-spacing-md, 8px);
font-size: var(--font-ui-smaller);
}
/* Variants */
.coalesce-btn-primary {
background-color: var(--interactive-accent);
color: var(--text-on-accent, #ffffff);
}
.coalesce-btn-primary:hover {
background-color: var(--interactive-accent-hover);
}
.coalesce-btn-secondary {
background-color: var(--background-secondary);
color: var(--text-normal);
}
.coalesce-btn-ghost {
background-color: transparent;
}
/* Icon-only buttons */
.coalesce-icon-button {
padding: var(--coalesce-spacing-sm, 4px);
}
.coalesce-icon-button svg {
width: var(--coalesce-icon-size-md);
height: var(--coalesce-icon-size-md);
}