drbanshan_banshan-skillhub/styles.css

631 lines
14 KiB
CSS

.skillhub-root {
display: flex;
flex-direction: column;
gap: 12px;
padding: 12px;
}
.skillhub-toolbar,
.skillhub-card-actions,
.skillhub-chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.skillhub-controls {
display: grid;
grid-template-columns: minmax(140px, 1fr) minmax(130px, 180px);
gap: 8px;
}
.skillhub-filter,
.skillhub-sort {
width: 100%;
}
.skillhub-bulk-toolbar {
align-items: center;
padding: 6px 8px;
background: var(--background-secondary);
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
}
.skillhub-selection-count {
margin-right: auto;
color: var(--text-muted);
font-size: var(--font-ui-small);
}
button.skillhub-toolbar-button {
position: relative;
display: flex;
align-items: center;
justify-content: flex-start;
min-width: 132px;
width: max-content;
height: 40px;
padding: 0 48px 0 20px;
border: none;
border-radius: 10px;
background-color: var(--interactive-accent);
box-shadow: none;
color: white;
cursor: pointer;
font-size: var(--font-ui-small);
font-weight: 500;
line-height: 1.05;
transition-duration: 0.3s;
}
.skillhub-toolbar-label {
white-space: nowrap;
text-align: left;
}
.skillhub-toolbar-icon {
position: absolute;
left: auto;
right: 0;
width: 19.5px;
margin-right: 20px;
padding: 0;
border: none;
fill: none;
stroke: white;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
transition-duration: 0.3s;
}
.skillhub-toolbar-icon path:first-child {
fill: white;
stroke: white;
}
button.skillhub-toolbar-button:hover {
color: transparent;
}
button.skillhub-toolbar-button:hover .skillhub-toolbar-icon {
left: 50%;
right: auto;
margin: 0;
padding: 0;
border: none;
transform: translateX(-50%);
transition-duration: 0.3s;
}
button.skillhub-toolbar-button:active {
box-shadow: none;
transform: translate(3px, 3px);
transition-duration: 0.3s;
}
button.skillhub-toolbar-button:disabled {
cursor: not-allowed;
filter: grayscale(0.35);
opacity: 0.55;
}
.skillhub-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
gap: 10px;
}
.skillhub-card {
position: relative;
display: flex;
flex-direction: column;
gap: 8px;
min-height: 118px;
padding: 10px;
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
background: color-mix(in srgb, var(--skillhub-card-color, var(--background-secondary)) 18%, var(--background-secondary));
border-color: color-mix(in srgb, var(--skillhub-card-color, var(--background-modifier-border)) 62%, var(--background-modifier-border));
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--skillhub-card-color, transparent) 24%, transparent);
transform-origin: center;
transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
z-index: 0;
}
.skillhub-card:hover,
.skillhub-card:focus-within {
transform: scale(1.02);
z-index: 1;
}
.skillhub-card.is-draggable {
cursor: grab;
}
.skillhub-card.is-draggable:active {
cursor: grabbing;
}
.skillhub-card.is-selectable,
.skillhub-collection-row.is-selectable {
cursor: pointer;
}
.skillhub-card.is-selected {
border-color: var(--interactive-accent);
box-shadow:
inset 0 0 0 1px var(--interactive-accent),
0 0 30px 1px color-mix(in srgb, var(--interactive-accent) 30%, transparent);
}
.skillhub-card.is-selectable:hover,
.skillhub-card.is-selectable:focus-visible,
.skillhub-collection-row.is-selectable:hover,
.skillhub-collection-row.is-selectable:focus-visible {
border-color: var(--interactive-accent);
box-shadow:
inset 0 0 0 1px color-mix(in srgb, var(--interactive-accent) 80%, transparent),
0 0 30px 1px color-mix(in srgb, var(--interactive-accent) 30%, transparent);
outline: none;
}
.skillhub-card p,
.skillhub-original-name {
margin: 0;
color: var(--text-muted);
font-size: var(--font-ui-smaller);
}
.skillhub-chip {
padding: 2px 6px;
border-radius: 4px;
background: var(--background-modifier-hover);
color: var(--text-muted);
font-size: var(--font-ui-smaller);
}
.skillhub-chip.has-color {
background: color-mix(in srgb, var(--skillhub-tag-color) 24%, var(--background-modifier-hover));
border: 1px solid color-mix(in srgb, var(--skillhub-tag-color) 56%, transparent);
color: var(--text-normal);
}
.skillhub-chip.is-warning,
.skillhub-error {
color: var(--text-error);
}
.skillhub-card-actions {
margin-top: auto;
overflow: visible;
opacity: 0;
pointer-events: none;
transition: opacity 120ms ease;
}
.skillhub-card:hover .skillhub-card-actions,
.skillhub-card:focus-within .skillhub-card-actions {
opacity: 1;
pointer-events: auto;
}
button.skillhub-card-action-button {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 3px;
width: 40px;
height: 40px;
padding: 0;
border: none;
border-radius: 8px;
background-color: transparent;
box-shadow: none;
cursor: pointer;
overflow: hidden;
transition: all 0.2s;
}
.skillhub-card-action-button svg {
width: 44%;
}
.skillhub-card-action-button svg,
.skillhub-card-action-button path,
.skillhub-card-action-button circle {
fill: none;
stroke: var(--text-normal);
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
transition: all 0.2s;
}
button.skillhub-card-action-button:hover {
overflow: visible;
}
button.skillhub-details-button:hover {
background-color: var(--interactive-accent);
}
button.skillhub-install-button:hover {
background-color: var(--interactive-accent);
}
button.skillhub-edit-button:hover {
background-color: var(--interactive-accent);
}
button.skillhub-delete-button:hover {
background-color: rgb(237, 56, 56);
}
.skillhub-card-action-button:hover svg,
.skillhub-card-action-button:hover path,
.skillhub-card-action-button:hover circle {
stroke: #fff;
}
.skillhub-delete-button:hover .bin path {
fill: #fff;
}
button.skillhub-card-action-button:active {
transform: scale(0.98);
}
.skillhub-action-tooltip {
--tooltip-color: rgb(41, 41, 41);
position: absolute;
top: -40px;
display: flex;
align-items: center;
justify-content: center;
padding: 8px 12px;
border-radius: 5px;
background-color: var(--tooltip-color);
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.105);
color: white;
font-size: 12px;
font-weight: 600;
opacity: 0;
pointer-events: none;
transition: all 0.5s;
white-space: nowrap;
}
.skillhub-action-tooltip::before {
position: absolute;
bottom: -10%;
width: 10px;
height: 10px;
background-color: var(--tooltip-color);
content: "";
transform: rotate(45deg);
}
.skillhub-card-action-button:hover .skillhub-action-tooltip {
opacity: 1;
}
.skillhub-collections-board {
display: grid;
grid-template-columns: 1fr;
gap: 10px;
margin-top: 12px;
}
.skillhub-collection-row {
position: relative;
grid-column: 1 / -1;
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px;
border: 1px solid color-mix(in srgb, var(--skillhub-collection-color, var(--background-modifier-border)) 58%, var(--background-modifier-border));
border-radius: 6px;
background: color-mix(in srgb, var(--skillhub-collection-color, var(--background-secondary)) 14%, var(--background-secondary));
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--skillhub-collection-color, transparent) 18%, transparent);
transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.skillhub-collection-row.is-selected {
border-color: var(--interactive-accent);
box-shadow:
inset 0 0 0 1px var(--interactive-accent),
0 0 30px 1px color-mix(in srgb, var(--interactive-accent) 30%, transparent);
}
.skillhub-collection-row.is-drop-target {
border-color: var(--interactive-accent);
box-shadow:
inset 0 0 0 1px var(--interactive-accent),
0 0 0 2px color-mix(in srgb, var(--interactive-accent) 24%, transparent);
transform: translateY(-1px);
}
.skillhub-collection-header,
.skillhub-collection-members,
.skillhub-collection-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
}
.skillhub-collection-count,
.skillhub-collection-empty,
.skillhub-collection-description {
color: var(--text-muted);
font-size: var(--font-ui-smaller);
}
.skillhub-collection-description {
margin: 0;
}
.skillhub-collection-actions {
overflow: visible;
opacity: 0;
pointer-events: none;
transition: opacity 120ms ease;
}
.skillhub-collection-row:hover .skillhub-collection-actions,
.skillhub-collection-row:focus-within .skillhub-collection-actions {
opacity: 1;
pointer-events: auto;
}
button.skillhub-collection-skill-block {
min-height: 34px;
padding: 6px 10px;
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
background: var(--background-primary);
color: var(--text-normal);
cursor: grab;
font-size: var(--font-ui-small);
line-height: 1.2;
box-shadow: none;
transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
button.skillhub-collection-skill-block:hover,
button.skillhub-collection-skill-block:focus-visible {
border-color: color-mix(in srgb, var(--interactive-accent) 55%, var(--background-modifier-border));
}
button.skillhub-collection-skill-block:active {
cursor: grabbing;
}
button.skillhub-collection-skill-block.is-drop-target {
border-color: var(--interactive-accent);
box-shadow: 0 0 0 2px color-mix(in srgb, var(--interactive-accent) 20%, transparent);
transform: translateY(-1px);
}
.skillhub-collection-edit-skills {
display: flex;
flex-direction: column;
gap: 8px;
margin: 12px 0;
}
.skillhub-collection-edit-skills h3 {
margin: 0;
font-size: var(--font-ui-small);
}
.skillhub-collection-edit-skill-row {
display: flex;
align-items: center;
justify-content: flex-start;
}
button.skillhub-collection-edit-skill {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: fit-content;
max-width: 100%;
min-height: 24px;
padding: 2px 9px;
border-color: transparent;
border-radius: 6px;
background: var(--background-secondary);
box-shadow: none;
color: var(--text-normal);
cursor: pointer;
overflow: hidden;
}
.skillhub-collection-edit-skill-label,
.skillhub-collection-edit-skill-remove {
transition: transform 160ms ease, opacity 160ms ease, color 160ms ease;
}
.skillhub-collection-edit-skill-remove {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-error);
font-size: var(--font-ui-small);
opacity: 0;
transform: translateX(100%);
}
.skillhub-collection-edit-skill:hover .skillhub-collection-edit-skill-remove,
.skillhub-collection-edit-skill:focus-within .skillhub-collection-edit-skill-remove {
opacity: 1;
transform: translateX(0);
}
.skillhub-collection-edit-skill:hover .skillhub-collection-edit-skill-label,
.skillhub-collection-edit-skill:focus-within .skillhub-collection-edit-skill-label {
color: transparent;
transform: translateX(-35%);
}
.skillhub-empty {
margin: 24px 0;
color: var(--text-muted);
text-align: center;
}
.skillhub-selection-list,
.skillhub-install-selection,
.skillhub-install-selection-section,
.skillhub-collections,
.skillhub-emoji-candidates,
.skillhub-edit-tags,
.skillhub-current-tags,
.skillhub-existing-tags {
display: flex;
flex-direction: column;
gap: 8px;
margin: 12px 0;
}
.skillhub-emoji-candidates,
.skillhub-edit-tags {
flex-direction: row;
flex-wrap: wrap;
margin-top: 0;
}
.skillhub-current-tags h3,
.skillhub-existing-tags h3 {
margin: 0;
font-size: var(--font-ui-small);
}
.skillhub-emoji-choice,
.skillhub-edit-tag,
.skillhub-existing-tag {
border-radius: 6px;
background: var(--background-secondary);
}
.skillhub-emoji-choice {
min-width: 30px;
min-height: 30px;
padding: 3px 6px;
border: 1px solid var(--background-modifier-border);
font-size: 18px;
}
.skillhub-emoji-choice.is-selected {
border-color: var(--interactive-accent);
background: var(--interactive-accent-hover);
}
.skillhub-edit-tag {
position: relative;
overflow: hidden;
}
.skillhub-existing-tags button.skillhub-existing-tag {
padding: 2px 8px;
border-color: transparent;
background: var(--skillhub-tag-color);
color: var(--text-normal);
box-shadow: none;
}
.skillhub-edit-tag button.skillhub-edit-tag-button {
position: relative;
min-height: 24px;
padding: 2px 9px;
border-radius: 6px;
border-color: transparent;
background: var(--skillhub-tag-color);
color: var(--text-normal);
box-shadow: none;
cursor: pointer;
overflow: hidden;
}
.skillhub-edit-tag:hover button.skillhub-edit-tag-button,
.skillhub-edit-tag:focus-within button.skillhub-edit-tag-button {
background: var(--background-secondary);
}
.skillhub-tag-text,
.skillhub-tag-delete-icon {
transition: transform 160ms ease, opacity 160ms ease, color 160ms ease;
}
.skillhub-tag-delete-icon {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-error);
font-size: var(--font-ui-small);
opacity: 0;
transform: translateX(100%);
}
.skillhub-edit-tag:hover .skillhub-tag-text,
.skillhub-edit-tag-button:focus-visible .skillhub-tag-text {
opacity: 0;
transform: translateX(-35%);
}
.skillhub-edit-tag:hover .skillhub-tag-delete-icon,
.skillhub-edit-tag-button:focus-visible .skillhub-tag-delete-icon {
opacity: 1;
transform: translateX(0);
}
.skillhub-tag-color {
position: absolute;
width: 1px;
height: 1px;
opacity: 0;
}
.skillhub-selection-item {
color: var(--text-normal);
}
.skillhub-command {
display: block;
overflow-x: auto;
padding: 8px;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
background: var(--background-primary-alt);
user-select: all;
}
.skillhub-detail-row {
display: grid;
grid-template-columns: minmax(100px, 140px) minmax(0, 1fr);
gap: 10px;
padding: 7px 0;
border-bottom: 1px solid var(--background-modifier-border);
}
.skillhub-detail-row span {
overflow-wrap: anywhere;
color: var(--text-muted);
}
@media (max-width: 480px) {
.skillhub-controls,
.skillhub-detail-row {
grid-template-columns: 1fr;
}
}