refactor(ui): localize component styles
This commit is contained in:
@@ -309,4 +309,348 @@ component Card {
|
||||
{/if}
|
||||
</div>
|
||||
}
|
||||
|
||||
style {
|
||||
.wire-next--card {
|
||||
--wire-card-color: var(--wire-component-color, var(--wire-color-primary));
|
||||
--wire-card-padding: 1.25rem;
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: var(--wire-color-text);
|
||||
}
|
||||
|
||||
.wire-next--card[data-size="sm"] {
|
||||
--wire-card-padding: 0.85rem;
|
||||
}
|
||||
|
||||
.wire-next--card[data-size="lg"] {
|
||||
--wire-card-padding: 1.75rem;
|
||||
}
|
||||
|
||||
.wire-next__card-panel {
|
||||
position: relative;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: var(--wire-radius-md);
|
||||
background: var(--wire-color-surface);
|
||||
box-shadow: var(--wire-shadow-1);
|
||||
transition:
|
||||
transform var(--wire-motion-base) var(--wire-ease-emphasized),
|
||||
border-color var(--wire-motion-base) ease,
|
||||
box-shadow var(--wire-motion-base) var(--wire-ease-emphasized);
|
||||
}
|
||||
|
||||
.wire-next--card[data-variant="top-border"] > .wire-next__card-panel,
|
||||
.wire-next--card[data-variant="accent"] > .wire-next__card-panel {
|
||||
border-top: 4px solid var(--wire-card-color);
|
||||
}
|
||||
|
||||
.wire-next--card[data-hover="raise"] > .wire-next__card-panel:hover {
|
||||
border-color: color-mix(in srgb, var(--wire-card-color) 38%, var(--wire-color-border));
|
||||
box-shadow: var(--wire-shadow-3);
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
|
||||
.wire-next__card-header,
|
||||
.wire-next__card-footer {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0.85rem var(--wire-card-padding);
|
||||
background: var(--wire-color-surface-2);
|
||||
color: var(--wire-color-muted);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.wire-next__card-header {
|
||||
border-bottom: 1px solid var(--wire-color-border);
|
||||
}
|
||||
|
||||
.wire-next__card-footer {
|
||||
margin-top: auto;
|
||||
border-top: 1px solid var(--wire-color-border);
|
||||
}
|
||||
|
||||
.wire-next__card-header-actions {
|
||||
display: inline-flex;
|
||||
gap: 0.2rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.wire-next__card-header-actions button {
|
||||
display: inline-grid;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
border: 0;
|
||||
border-radius: var(--wire-radius-sm);
|
||||
background: transparent;
|
||||
color: var(--wire-color-muted);
|
||||
cursor: pointer;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
.wire-next__card-header-actions button:hover {
|
||||
background: color-mix(in srgb, var(--wire-card-color) 12%, transparent);
|
||||
color: var(--wire-card-color);
|
||||
}
|
||||
|
||||
.wire-next__card-header-actions button:focus-visible {
|
||||
outline: 2px solid var(--wire-card-color);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.wire-next__card-media {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-height: 10rem;
|
||||
background: var(--wire-color-surface-2);
|
||||
}
|
||||
|
||||
.wire-next__card-media > img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: inherit;
|
||||
object-fit: cover;
|
||||
transition: transform 420ms var(--wire-ease-emphasized);
|
||||
}
|
||||
|
||||
.wire-next--card[data-hover="image"] .wire-next__card-panel:hover .wire-next__card-media > img {
|
||||
transform: scale(1.06);
|
||||
}
|
||||
|
||||
.wire-next__card-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.55rem;
|
||||
padding: clamp(1.25rem, 4vw, 2rem);
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgb(2 6 23 / 0.9) 0%,
|
||||
rgb(2 6 23 / 0.68) 38%,
|
||||
rgb(2 6 23 / 0.34) 58%,
|
||||
rgb(2 6 23 / 0.86) 100%
|
||||
);
|
||||
color: white;
|
||||
text-shadow: 0 1px 2px rgb(0 0 0 / 0.42);
|
||||
}
|
||||
|
||||
.wire-next__card-overlay h3 {
|
||||
color: white;
|
||||
font-size: clamp(1.1rem, 2.2vw, 1.35rem);
|
||||
}
|
||||
|
||||
.wire-next__card-overlay p {
|
||||
max-width: 48rem;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
line-height: 1.6;
|
||||
text-shadow:
|
||||
0 1px 2px rgb(0 0 0 / 0.9),
|
||||
0 2px 8px rgb(0 0 0 / 0.62);
|
||||
}
|
||||
|
||||
.wire-next__card-overlay .wire-next__card-subtitle {
|
||||
color: rgb(255 255 255 / 0.78);
|
||||
}
|
||||
|
||||
.wire-next__card-overlay small {
|
||||
margin-top: auto;
|
||||
color: rgb(255 255 255 / 0.88);
|
||||
font-weight: 600;
|
||||
text-shadow: 0 1px 2px rgb(0 0 0 / 0.55);
|
||||
}
|
||||
|
||||
.wire-next__card-body {
|
||||
display: grid;
|
||||
gap: 0.65rem;
|
||||
min-width: 0;
|
||||
padding: var(--wire-card-padding);
|
||||
}
|
||||
|
||||
.wire-next__card-body[data-scrollable="true"] {
|
||||
max-height: var(--wire-card-max-height);
|
||||
overflow: auto;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-color: var(--wire-card-color) transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.wire-next__card-body h3,
|
||||
.wire-next__card-body p,
|
||||
.wire-next__card-overlay h3,
|
||||
.wire-next__card-overlay p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wire-next__card-body p {
|
||||
color: var(--wire-color-muted);
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.wire-next__card-subtitle {
|
||||
color: var(--wire-color-muted);
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.wire-next__card-action {
|
||||
display: inline-flex;
|
||||
gap: 0.25rem;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
margin-top: 0.2rem;
|
||||
color: var(--wire-card-color);
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wire-next__card-action:hover {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.2em;
|
||||
}
|
||||
|
||||
.wire-next__card-navigation {
|
||||
background: var(--wire-color-surface-2);
|
||||
}
|
||||
|
||||
.wire-next__card-tabs {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.wire-next__card-tabs button {
|
||||
min-height: 3rem;
|
||||
flex: 1 0 auto;
|
||||
padding-inline: 1rem;
|
||||
border: 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
background: transparent;
|
||||
color: var(--wire-color-muted);
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.wire-next__card-tabs button[data-active="true"] {
|
||||
border-color: var(--wire-card-color);
|
||||
color: var(--wire-color-text);
|
||||
}
|
||||
|
||||
.wire-next__card-navigation-select {
|
||||
display: none;
|
||||
width: calc(100% - 2rem);
|
||||
min-height: 2.75rem;
|
||||
margin: 1rem;
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: var(--wire-radius-sm);
|
||||
background: var(--wire-color-surface);
|
||||
color: var(--wire-color-text);
|
||||
}
|
||||
|
||||
.wire-next__card-alert {
|
||||
display: flex;
|
||||
gap: 0.35rem;
|
||||
padding: 0.8rem var(--wire-card-padding);
|
||||
background: color-mix(in srgb, var(--wire-card-color) 14%, var(--wire-color-surface-2));
|
||||
color: var(--wire-color-text);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.wire-next__card-empty {
|
||||
display: grid;
|
||||
min-height: 12rem;
|
||||
color: var(--wire-color-muted);
|
||||
place-content: center;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
.wire-next__card-empty > span {
|
||||
margin-bottom: 0.75rem;
|
||||
font-size: 2.25rem;
|
||||
}
|
||||
|
||||
.wire-next--card[data-align="center"] .wire-next__card-body {
|
||||
text-align: center;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
.wire-next--card[data-layout="horizontal"] > .wire-next__card-panel {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(12rem, 42%) minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.wire-next--card[data-layout="horizontal"] .wire-next__card-media {
|
||||
grid-row: 1 / span 4;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.wire-next__card-group {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(var(--wire-card-columns, 3), minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.wire-next__card-group > .wire-next__card-panel {
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.wire-next__card-group > .wire-next__card-panel:not(:first-child) {
|
||||
margin-inline-start: -1px;
|
||||
}
|
||||
|
||||
.wire-next__card-group > .wire-next__card-panel:first-child {
|
||||
border-start-start-radius: var(--wire-radius-md);
|
||||
border-end-start-radius: var(--wire-radius-md);
|
||||
}
|
||||
|
||||
.wire-next__card-group > .wire-next__card-panel:last-child {
|
||||
border-start-end-radius: var(--wire-radius-md);
|
||||
border-end-end-radius: var(--wire-radius-md);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.wire-next--card[data-layout="horizontal"] > .wire-next__card-panel {
|
||||
display: flex;
|
||||
}
|
||||
.wire-next--card[data-layout="horizontal"] .wire-next__card-media {
|
||||
min-height: 12rem;
|
||||
}
|
||||
.wire-next__card-group {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.wire-next__card-group > .wire-next__card-panel:not(:first-child) {
|
||||
margin-top: -1px;
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
.wire-next__card-group > .wire-next__card-panel {
|
||||
border-radius: 0;
|
||||
}
|
||||
.wire-next__card-group > .wire-next__card-panel:first-child {
|
||||
border-start-start-radius: var(--wire-radius-md);
|
||||
border-start-end-radius: var(--wire-radius-md);
|
||||
}
|
||||
.wire-next__card-group > .wire-next__card-panel:last-child {
|
||||
border-end-start-radius: var(--wire-radius-md);
|
||||
border-end-end-radius: var(--wire-radius-md);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.wire-next__card-tabs:has(+ .wire-next__card-navigation-select) {
|
||||
display: none;
|
||||
}
|
||||
.wire-next__card-navigation-select {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user