clone of github.com/decent-newsroom/newsroom
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

228 lines
4.6 KiB

/* Dropdown Component Styles */
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-toggle {
cursor: pointer;
user-select: none;
}
.dropdown-toggle::after {
display: inline-block;
margin-left: 0.5em;
vertical-align: 0.125em;
content: "";
border-top: 0.3em solid;
border-right: 0.3em solid transparent;
border-bottom: 0;
border-left: 0.3em solid transparent;
}
.dropdown-toggle:hover {
opacity: 0.9;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
min-width: 280px;
padding: 0.5rem 0;
margin: 0.125rem 0 0;
font-size: 1rem;
color: var(--text-primary, #212529);
text-align: left;
list-style: none;
background-color: var(--surface, #fff);
background-clip: padding-box;
border: 1px solid var(--border-color, rgba(0, 0, 0, 0.15));
border-radius: 0.375rem;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}
.dropdown-menu.show {
display: block;
}
.dropdown-item {
display: block;
width: 100%;
padding: 0.5rem 1rem;
clear: both;
font-weight: 400;
color: var(--text-primary, #212529);
text-align: inherit;
text-decoration: none;
white-space: nowrap;
background-color: transparent;
border: 0;
cursor: pointer;
transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}
.dropdown-item:hover,
.dropdown-item:focus {
color: var(--text-primary, #1e2125);
background-color: var(--surface-hover, #e9ecef);
text-decoration: none;
}
.dropdown-item:active {
color: var(--text-on-primary, #fff);
background-color: var(--primary, #0d6efd);
text-decoration: none;
}
.dropdown-item.disabled,
.dropdown-item:disabled {
color: var(--text-muted, #6c757d);
pointer-events: none;
background-color: transparent;
cursor: not-allowed;
opacity: 0.65;
}
.dropdown-header {
display: block;
padding: 0.5rem 1rem;
margin-bottom: 0;
font-size: 0.875rem;
color: var(--text-muted, #6c757d);
white-space: nowrap;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.dropdown-divider {
height: 0;
margin: 0.5rem 0;
overflow: hidden;
border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.15));
}
/* Dropdown menu positioning variants */
.dropdown-menu-end {
right: 0;
left: auto;
}
.dropdown-menu-start {
right: auto;
left: 0;
}
/* Reading List Dropdown Specific Styles */
.dropdown-item .d-flex {
align-items: center;
}
.dropdown-item strong {
font-size: 0.95rem;
color: var(--text-primary, #212529);
}
.dropdown-item small {
font-size: 0.8rem;
line-height: 1.3;
}
.dropdown-item .badge {
font-size: 0.75rem;
padding: 0.25em 0.5em;
}
/* Status alerts inside dropdown */
.dropdown + [data-reading-list-dropdown-target="status"] {
margin-top: 0.5rem;
padding: 0.5rem 0.75rem;
border-radius: 0.25rem;
font-size: 0.875rem;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.dropdown-menu {
min-width: 240px;
max-width: 90vw;
}
.dropdown-item {
padding: 0.75rem 1rem;
}
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
.dropdown-menu {
background-color: var(--surface-dark, #2b2b2b);
border-color: var(--border-color-dark, rgba(255, 255, 255, 0.15));
color: var(--text-primary-dark, #e9ecef);
}
.dropdown-item {
color: var(--text-primary-dark, #e9ecef);
}
.dropdown-item:hover,
.dropdown-item:focus {
background-color: var(--surface-hover-dark, #3b3b3b);
color: var(--text-primary-dark, #fff);
}
.dropdown-item strong {
color: var(--text-primary-dark, #fff);
}
.dropdown-header {
color: var(--text-muted-dark, #adb5bd);
}
}
/* Animation for dropdown appearance */
@keyframes dropdown-fade-in {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.dropdown-menu.show {
animation: dropdown-fade-in 0.15s ease-out;
}
/* Loading state */
.dropdown-item.loading {
pointer-events: none;
opacity: 0.6;
position: relative;
}
.dropdown-item.loading::after {
content: "";
position: absolute;
right: 1rem;
top: 50%;
transform: translateY(-50%);
width: 1rem;
height: 1rem;
border: 2px solid var(--text-muted, #6c757d);
border-top-color: transparent;
border-radius: 50%;
animation: spinner-rotate 0.6s linear infinite;
}
@keyframes spinner-rotate {
to {
transform: translateY(-50%) rotate(360deg);
}
}