wenlzhang_obsidian-tag-index/styles.css
2025-03-24 13:48:52 +01:00

214 lines
3.7 KiB
CSS

/* Tag Index Container */
.tag-index-container {
margin-top: 8px;
display: flex;
flex-direction: column;
gap: 4px;
}
.tag-index-empty-state {
padding: 20px;
text-align: center;
color: var(--text-muted);
font-style: italic;
}
/* Tag styling */
.tag-index-tag {
display: flex;
flex-direction: column;
border-radius: 4px;
background-color: var(--background-secondary);
position: relative;
transition: background-color 0.2s ease;
margin-bottom: 2px;
}
.tag-index-tag-header {
display: flex;
align-items: center;
padding: 4px 12px;
cursor: pointer;
border-radius: 4px;
justify-content: space-between;
}
.tag-index-tag-header:hover {
background-color: var(--background-secondary-alt);
}
.tag-index-collapse-icon {
color: var(--text-muted);
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
margin-right: 4px;
}
.tag-index-tag-name {
display: flex;
align-items: center;
gap: 6px;
flex: 1;
}
.tag-index-icon {
color: var(--text-accent);
}
/* Header styling */
.tag-index-header {
display: flex;
justify-content: flex-end;
padding: 0 8px;
margin-top: 8px;
}
.tag-index-info-icon {
color: var(--text-muted);
cursor: help;
opacity: 0.7;
transition: opacity 0.2s ease;
}
.tag-index-info-icon:hover {
opacity: 1;
color: var(--text-normal);
}
/* Notes container within a tag */
.tag-index-tag-notes {
padding-left: 32px;
margin: 0px 0 4px 0;
border-left: 1px solid var(--background-modifier-border);
}
/* Expanded tag */
.tag-expanded > .tag-index-tag-header {
font-weight: 500;
}
/* Loading indicator */
.tag-index-loading {
padding: 8px;
color: var(--text-muted);
font-style: italic;
font-size: 0.9em;
}
/* Empty note message */
.tag-index-empty-note {
padding: 8px;
color: var(--text-muted);
font-style: italic;
font-size: 0.9em;
}
/* Remove button */
.tag-index-remove-btn {
opacity: 0.6;
cursor: pointer;
transition: opacity 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
}
.tag-index-remove-btn:hover {
opacity: 1;
color: var(--text-error);
}
/* Drag and drop styles */
.tag-being-dragged {
opacity: 0.5;
border: 1px dashed var(--text-accent);
}
.tag-drag-over {
border-top: 2px solid var(--text-accent);
}
/* Notes list */
.tag-index-notes-list {
margin-top: 4px;
display: flex;
flex-direction: column;
gap: 4px;
}
.tag-index-note-item {
position: relative;
padding: 4px 8px;
border-radius: 4px;
display: flex;
align-items: center;
transition: background-color 0.2s ease;
}
.tag-index-note-item:hover {
background-color: var(--background-secondary-alt);
}
.tag-index-note-link {
text-decoration: none;
color: var(--text-normal);
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tag-index-note-link:hover {
text-decoration: underline;
color: var(--text-accent);
}
/* Note preview on hover */
.tag-index-note-preview {
position: absolute;
left: calc(100% + 10px);
top: 0;
width: 300px;
max-height: 200px;
overflow-y: auto;
padding: 12px;
border-radius: 6px;
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
z-index: 100;
}
/* Settings tab styles */
.tag-index-instructions {
background-color: var(--background-secondary);
padding: 16px;
border-radius: 4px;
margin: 12px 0;
}
.tag-index-instructions p {
margin: 8px 0;
line-height: 1.5;
}
/* Mobile responsive */
@media (max-width: 768px) {
.tag-index-note-preview {
left: 5%;
top: calc(100% + 10px);
width: 90%;
}
}
/* Display state classes */
.tag-index-display-none {
display: none;
}
.tag-index-display-block {
display: block;
}