114 lines
2.4 KiB
SCSS
114 lines
2.4 KiB
SCSS
:host {
|
|
display: inline-flex;
|
|
width: fit-content;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.topic-chip__button {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
align-items: center;
|
|
justify-items: center;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
color: inherit;
|
|
font-family: inherit;
|
|
line-height: 1.25;
|
|
cursor: pointer;
|
|
|
|
&:disabled {
|
|
cursor: default;
|
|
}
|
|
}
|
|
|
|
:host(.topic-chip--normal) .topic-chip__button {
|
|
column-gap: 8px;
|
|
min-height: 34px;
|
|
padding: 6px 10px;
|
|
border: 1px solid var(--topic-border);
|
|
border-radius: 8px;
|
|
background: var(--topic-bg);
|
|
color: var(--topic-text);
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
transition:
|
|
transform 0.15s ease,
|
|
box-shadow 0.15s ease;
|
|
|
|
&:hover:not(:disabled) {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
|
|
:host(.topic-chip--mini) .topic-chip__button {
|
|
column-gap: 5px;
|
|
padding: 4px 7px;
|
|
border: 0;
|
|
border-radius: 7px;
|
|
background: color-mix(in srgb, var(--topic-color) 15%, #ffffff);
|
|
color: var(--topic-text);
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
|
|
&:hover:not(:disabled) {
|
|
color: var(--topic-text);
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
|
|
:host(.topic-chip--active.topic-chip--normal) .topic-chip__button {
|
|
border-color: var(--topic-color);
|
|
box-shadow: 0 0 0 2px color-mix(in srgb, var(--topic-color) 26%, transparent);
|
|
}
|
|
|
|
:host(.topic-chip--active.topic-chip--mini) .topic-chip__button {
|
|
background: color-mix(in srgb, var(--topic-color) 24%, #ffffff);
|
|
color: var(--topic-text);
|
|
}
|
|
|
|
.topic-chip__label {
|
|
min-width: 0;
|
|
text-align: center;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.topic-chip__count {
|
|
display: inline-flex;
|
|
flex: 0 0 auto;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 2px;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
padding: 0 5px;
|
|
border-radius: 999px;
|
|
background: var(--topic-count-bg);
|
|
color: var(--topic-count-text);
|
|
font-size: 11px;
|
|
font-weight: 800;
|
|
box-shadow:
|
|
inset 0 0 0 1px color-mix(in srgb, var(--topic-color) 24%, transparent),
|
|
0 1px 2px rgba(15, 23, 42, 0.08);
|
|
}
|
|
|
|
:host(.topic-chip--mini) .topic-chip__count {
|
|
min-width: 0;
|
|
height: auto;
|
|
padding: 0;
|
|
border-radius: 0;
|
|
background: transparent;
|
|
color: var(--topic-count-text);
|
|
font-size: 10px;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.topic-chip__count-icon {
|
|
width: 13px;
|
|
height: 13px;
|
|
font-size: 13px;
|
|
line-height: 1;
|
|
}
|