Refactor CSS using nested selectors and media queries
Improves CSS organization by adopting PostCSS nesting syntax Enhances responsiveness with refined media query implementations Reduces code repetition and improves maintainability of stylesheets Modernizes CSS structure across multiple component stylesheets
This commit is contained in:
parent
29f9c79764
commit
5e2cab9bd5
6 changed files with 1539 additions and 1608 deletions
|
|
@ -19,6 +19,20 @@ swp-filter-bar {
|
|||
border-radius: var(--radius-lg);
|
||||
margin-bottom: var(--spacing-10);
|
||||
flex-wrap: wrap;
|
||||
|
||||
input, select {
|
||||
padding: var(--spacing-4) var(--spacing-6);
|
||||
font-size: var(--font-size-md);
|
||||
font-family: var(--font-family);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-surface);
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swp-filter-group {
|
||||
|
|
@ -33,22 +47,6 @@ swp-filter-label {
|
|||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
swp-filter-bar input,
|
||||
swp-filter-bar select {
|
||||
padding: var(--spacing-4) var(--spacing-6);
|
||||
font-size: var(--font-size-md);
|
||||
font-family: var(--font-family);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
swp-filter-bar input:focus,
|
||||
swp-filter-bar select:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
}
|
||||
|
||||
swp-filter-spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
|
@ -62,47 +60,47 @@ swp-cash-stats {
|
|||
gap: var(--spacing-8);
|
||||
max-width: var(--page-max-width);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
swp-cash-stats:not(.active) {
|
||||
display: none;
|
||||
&:not(.active) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
swp-cash-stat {
|
||||
background: var(--color-background-alt);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--spacing-6) var(--spacing-8);
|
||||
}
|
||||
|
||||
swp-cash-stat-value {
|
||||
display: block;
|
||||
font-size: var(--font-size-2xl);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
font-family: var(--font-mono);
|
||||
color: var(--color-text);
|
||||
}
|
||||
swp-cash-stat-value {
|
||||
display: block;
|
||||
font-size: var(--font-size-2xl);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
font-family: var(--font-mono);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
swp-cash-stat-label {
|
||||
display: block;
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-secondary);
|
||||
margin-top: var(--spacing-2);
|
||||
}
|
||||
swp-cash-stat-label {
|
||||
display: block;
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-secondary);
|
||||
margin-top: var(--spacing-2);
|
||||
}
|
||||
|
||||
swp-cash-stat.highlight swp-cash-stat-value {
|
||||
color: var(--color-teal);
|
||||
}
|
||||
&.highlight swp-cash-stat-value {
|
||||
color: var(--color-teal);
|
||||
}
|
||||
|
||||
swp-cash-stat.warning swp-cash-stat-value {
|
||||
color: var(--color-amber);
|
||||
}
|
||||
&.warning swp-cash-stat-value {
|
||||
color: var(--color-amber);
|
||||
}
|
||||
|
||||
swp-cash-stat.negative swp-cash-stat-value {
|
||||
color: var(--color-red);
|
||||
}
|
||||
&.negative swp-cash-stat-value {
|
||||
color: var(--color-red);
|
||||
}
|
||||
|
||||
swp-cash-stat.user swp-cash-stat-value {
|
||||
color: var(--color-blue);
|
||||
&.user swp-cash-stat-value {
|
||||
color: var(--color-blue);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================
|
||||
|
|
@ -134,20 +132,41 @@ swp-cash-table {
|
|||
border: 1px solid var(--color-border);
|
||||
border-radius: 0 0 var(--radius-lg) var(--radius-lg);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
swp-cash-table-header,
|
||||
swp-cash-table-body {
|
||||
display: grid;
|
||||
grid-column: 1 / -1;
|
||||
grid-template-columns: subgrid;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
accent-color: var(--color-teal);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
swp-cash-table-header {
|
||||
background: var(--color-background-alt);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding: var(--spacing-6) var(--spacing-10);
|
||||
align-items: center;
|
||||
swp-cash-table-header {
|
||||
display: grid;
|
||||
grid-column: 1 / -1;
|
||||
grid-template-columns: subgrid;
|
||||
background: var(--color-background-alt);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding: var(--spacing-6) var(--spacing-10);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
swp-cash-table-body {
|
||||
display: grid;
|
||||
grid-column: 1 / -1;
|
||||
grid-template-columns: subgrid;
|
||||
}
|
||||
|
||||
swp-cash-table-footer {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: var(--spacing-7) var(--spacing-10);
|
||||
background: var(--color-background-alt);
|
||||
border-top: 1px solid var(--color-border);
|
||||
font-size: var(--font-size-md);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
swp-cash-table-row {
|
||||
|
|
@ -155,6 +174,27 @@ swp-cash-table-row {
|
|||
grid-column: 1 / -1;
|
||||
grid-template-columns: subgrid;
|
||||
align-items: center;
|
||||
padding: var(--spacing-7) var(--spacing-10);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
cursor: pointer;
|
||||
transition: background var(--transition-fast);
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--color-background-hover);
|
||||
}
|
||||
|
||||
&.draft-row {
|
||||
background: var(--bg-amber-subtle);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: var(--bg-amber-medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swp-cash-th {
|
||||
|
|
@ -163,90 +203,71 @@ swp-cash-th {
|
|||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
swp-cash-th.right {
|
||||
text-align: right;
|
||||
}
|
||||
&.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
swp-cash-th.checkbox,
|
||||
swp-cash-td.checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
&.checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
swp-cash-table input[type="checkbox"] {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
accent-color: var(--color-teal);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
swp-cash-table-row {
|
||||
padding: var(--spacing-7) var(--spacing-10);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
cursor: pointer;
|
||||
transition: background var(--transition-fast);
|
||||
}
|
||||
|
||||
swp-cash-table-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
swp-cash-table-row:hover {
|
||||
background: var(--color-background-hover);
|
||||
}
|
||||
|
||||
/* Draft row - clickable to go to Kasseafstemning */
|
||||
swp-cash-table-row.draft-row {
|
||||
background: var(--bg-amber-subtle);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
swp-cash-table-row.draft-row:hover {
|
||||
background: var(--bg-amber-medium);
|
||||
&:nth-child(9) {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
swp-cash-td {
|
||||
font-size: var(--font-size-base);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
swp-cash-td.right {
|
||||
text-align: right;
|
||||
}
|
||||
&.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
swp-cash-td.mono {
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
&.mono {
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
swp-cash-td.muted {
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
&.muted {
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
swp-cash-td.negative {
|
||||
color: var(--color-red);
|
||||
}
|
||||
&.negative {
|
||||
color: var(--color-red);
|
||||
}
|
||||
|
||||
swp-cash-td.positive {
|
||||
color: var(--color-green);
|
||||
}
|
||||
&.positive {
|
||||
color: var(--color-green);
|
||||
}
|
||||
|
||||
swp-cash-td.id {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-secondary);
|
||||
font-family: var(--font-mono);
|
||||
&.id {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-secondary);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
&.checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&:nth-child(9) {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
swp-period-cell {
|
||||
display: block;
|
||||
}
|
||||
|
||||
swp-period-cell .dates {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-secondary);
|
||||
.dates {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================
|
||||
|
|
@ -262,72 +283,50 @@ swp-row-toggle {
|
|||
color: var(--color-text-secondary);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background: var(--color-background-alt);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
i {
|
||||
font-size: var(--font-size-lg);
|
||||
transition: transform var(--transition-fast);
|
||||
}
|
||||
}
|
||||
|
||||
swp-row-toggle:hover {
|
||||
background: var(--color-background-alt);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
swp-row-toggle i {
|
||||
font-size: var(--font-size-lg);
|
||||
transition: transform var(--transition-fast);
|
||||
}
|
||||
|
||||
/* Row detail - hidden by default */
|
||||
swp-cash-row-detail {
|
||||
grid-column: 1 / -1;
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
background: var(--color-background-alt);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
|
||||
&.expanded {
|
||||
display: block;
|
||||
}
|
||||
|
||||
swp-row-detail-content {
|
||||
display: block;
|
||||
padding: var(--spacing-8) var(--spacing-10);
|
||||
}
|
||||
|
||||
swp-row-detail-actions {
|
||||
display: flex;
|
||||
gap: var(--spacing-4);
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
swp-cash-row-detail.expanded {
|
||||
display: block;
|
||||
}
|
||||
|
||||
swp-row-detail-content {
|
||||
display: block;
|
||||
padding: var(--spacing-8) var(--spacing-10);
|
||||
}
|
||||
|
||||
swp-row-detail-actions {
|
||||
display: flex;
|
||||
gap: var(--spacing-4);
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/* Legacy support */
|
||||
swp-row-arrow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
swp-row-arrow i {
|
||||
font-size: var(--font-size-lg);
|
||||
}
|
||||
|
||||
swp-cash-table-footer {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: var(--spacing-7) var(--spacing-10);
|
||||
background: var(--color-background-alt);
|
||||
border-top: 1px solid var(--color-border);
|
||||
font-size: var(--font-size-md);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
/* Status badge styles in components.css */
|
||||
|
||||
/* Center status column */
|
||||
swp-cash-th:nth-child(9),
|
||||
swp-cash-td:nth-child(9) {
|
||||
text-align: center;
|
||||
i {
|
||||
font-size: var(--font-size-lg);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================
|
||||
|
|
@ -339,12 +338,6 @@ swp-cash-grid {
|
|||
gap: var(--spacing-12);
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
swp-cash-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
swp-cash-column {
|
||||
display: grid;
|
||||
gap: var(--spacing-10);
|
||||
|
|
@ -354,25 +347,24 @@ swp-cash-column {
|
|||
/* ===========================================
|
||||
DATA TABLE (Dagens Tal)
|
||||
=========================================== */
|
||||
|
||||
swp-data-header {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 100px 140px;
|
||||
gap: var(--spacing-6);
|
||||
padding: var(--spacing-5) 0;
|
||||
border-bottom: 2px solid var(--color-border);
|
||||
}
|
||||
|
||||
swp-data-header span {
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
span {
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: var(--color-text-secondary);
|
||||
|
||||
swp-data-header span:not(:first-child) {
|
||||
text-align: right;
|
||||
&:not(:first-child) {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swp-data-row {
|
||||
|
|
@ -382,10 +374,10 @@ swp-data-row {
|
|||
padding: var(--spacing-7) 0;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
swp-data-row:last-child {
|
||||
border-bottom: none;
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
swp-data-label {
|
||||
|
|
@ -400,26 +392,28 @@ swp-data-system {
|
|||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
swp-data-input input {
|
||||
width: 100%;
|
||||
padding: var(--spacing-4) var(--spacing-5);
|
||||
font-size: var(--font-size-base);
|
||||
font-family: var(--font-mono);
|
||||
text-align: right;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-surface);
|
||||
}
|
||||
swp-data-input {
|
||||
input {
|
||||
width: 100%;
|
||||
padding: var(--spacing-4) var(--spacing-5);
|
||||
font-size: var(--font-size-base);
|
||||
font-family: var(--font-mono);
|
||||
text-align: right;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-surface);
|
||||
|
||||
swp-data-input input:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
}
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
}
|
||||
|
||||
swp-data-input input::placeholder {
|
||||
color: var(--color-text-muted);
|
||||
font-family: var(--font-family);
|
||||
font-size: var(--font-size-sm);
|
||||
&::placeholder {
|
||||
color: var(--color-text-muted);
|
||||
font-family: var(--font-family);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swp-data-value {
|
||||
|
|
@ -427,10 +421,10 @@ swp-data-value {
|
|||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-base);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
swp-data-value.muted {
|
||||
color: var(--color-text-secondary);
|
||||
&.muted {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
swp-table-note {
|
||||
|
|
@ -452,56 +446,60 @@ swp-calc-row {
|
|||
align-items: center;
|
||||
padding: var(--spacing-7) 0;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&.input-row {
|
||||
background: var(--color-background-alt);
|
||||
margin: var(--spacing-8) calc(-1 * var(--spacing-5)) calc(-1 * var(--spacing-5));
|
||||
padding: var(--spacing-8) var(--spacing-5);
|
||||
border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
|
||||
}
|
||||
}
|
||||
|
||||
swp-calc-row:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
swp-calc-label {
|
||||
span {
|
||||
display: block;
|
||||
font-size: var(--font-size-base);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
swp-calc-row.input-row {
|
||||
background: var(--color-background-alt);
|
||||
margin: var(--spacing-8) calc(-1 * var(--spacing-5)) calc(-1 * var(--spacing-5));
|
||||
padding: var(--spacing-8) var(--spacing-5);
|
||||
border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
|
||||
}
|
||||
|
||||
swp-calc-label span {
|
||||
display: block;
|
||||
font-size: var(--font-size-base);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
swp-calc-label small {
|
||||
display: block;
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-secondary);
|
||||
margin-top: var(--spacing-1);
|
||||
small {
|
||||
display: block;
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-secondary);
|
||||
margin-top: var(--spacing-1);
|
||||
}
|
||||
}
|
||||
|
||||
swp-calc-value {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-base);
|
||||
color: var(--color-text);
|
||||
|
||||
&.muted {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
swp-calc-value.muted {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
swp-calc-input {
|
||||
input {
|
||||
width: 140px;
|
||||
padding: var(--spacing-6) var(--spacing-7);
|
||||
font-size: var(--font-size-lg);
|
||||
font-family: var(--font-mono);
|
||||
text-align: right;
|
||||
border: 2px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-surface);
|
||||
|
||||
swp-calc-input input {
|
||||
width: 140px;
|
||||
padding: var(--spacing-6) var(--spacing-7);
|
||||
font-size: var(--font-size-lg);
|
||||
font-family: var(--font-mono);
|
||||
text-align: right;
|
||||
border: 2px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
swp-calc-input input:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================
|
||||
|
|
@ -514,50 +512,50 @@ swp-difference-box {
|
|||
padding: var(--spacing-10);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--color-background-alt);
|
||||
}
|
||||
|
||||
swp-difference-box.positive {
|
||||
background: var(--bg-green-medium);
|
||||
}
|
||||
&.positive {
|
||||
background: var(--bg-green-medium);
|
||||
|
||||
swp-difference-box.negative {
|
||||
background: var(--bg-red-medium);
|
||||
}
|
||||
swp-difference-value {
|
||||
color: var(--color-green);
|
||||
}
|
||||
}
|
||||
|
||||
swp-difference-box.neutral {
|
||||
background: var(--bg-teal-medium);
|
||||
}
|
||||
&.negative {
|
||||
background: var(--bg-red-medium);
|
||||
|
||||
swp-difference-label {
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: var(--font-weight-medium);
|
||||
color: var(--color-text);
|
||||
}
|
||||
swp-difference-value {
|
||||
color: var(--color-red);
|
||||
}
|
||||
}
|
||||
|
||||
swp-difference-label small {
|
||||
display: block;
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: var(--font-weight-regular);
|
||||
color: var(--color-text-secondary);
|
||||
margin-top: var(--spacing-2);
|
||||
}
|
||||
&.neutral {
|
||||
background: var(--bg-teal-medium);
|
||||
|
||||
swp-difference-value {
|
||||
font-size: var(--font-size-2xl);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
swp-difference-value {
|
||||
color: var(--color-teal);
|
||||
}
|
||||
}
|
||||
|
||||
swp-difference-box.positive swp-difference-value {
|
||||
color: var(--color-green);
|
||||
}
|
||||
swp-difference-label {
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: var(--font-weight-medium);
|
||||
color: var(--color-text);
|
||||
|
||||
swp-difference-box.negative swp-difference-value {
|
||||
color: var(--color-red);
|
||||
}
|
||||
small {
|
||||
display: block;
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: var(--font-weight-regular);
|
||||
color: var(--color-text-secondary);
|
||||
margin-top: var(--spacing-2);
|
||||
}
|
||||
}
|
||||
|
||||
swp-difference-box.neutral swp-difference-value {
|
||||
color: var(--color-teal);
|
||||
swp-difference-value {
|
||||
font-size: var(--font-size-2xl);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================
|
||||
|
|
@ -568,30 +566,30 @@ swp-period-display {
|
|||
padding: var(--spacing-8);
|
||||
background: var(--color-background-alt);
|
||||
border-radius: var(--radius-lg);
|
||||
}
|
||||
|
||||
swp-period-label {
|
||||
display: block;
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: var(--spacing-4);
|
||||
}
|
||||
swp-period-label {
|
||||
display: block;
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: var(--spacing-4);
|
||||
}
|
||||
|
||||
swp-period-value {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-5);
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: var(--font-weight-medium);
|
||||
color: var(--color-text);
|
||||
}
|
||||
swp-period-value {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-5);
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: var(--font-weight-medium);
|
||||
color: var(--color-text);
|
||||
|
||||
swp-period-value .arrow {
|
||||
color: var(--color-teal);
|
||||
font-weight: var(--font-weight-regular);
|
||||
.arrow {
|
||||
color: var(--color-teal);
|
||||
font-weight: var(--font-weight-regular);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================
|
||||
|
|
@ -605,10 +603,10 @@ swp-form-grid {
|
|||
|
||||
swp-form-field {
|
||||
display: block;
|
||||
}
|
||||
|
||||
swp-form-field.full-width {
|
||||
grid-column: 1 / -1;
|
||||
&.full-width {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
}
|
||||
|
||||
swp-form-label {
|
||||
|
|
@ -619,28 +617,28 @@ swp-form-label {
|
|||
margin-bottom: var(--spacing-3);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.3px;
|
||||
|
||||
.required {
|
||||
color: var(--color-red);
|
||||
}
|
||||
}
|
||||
|
||||
swp-form-label .required {
|
||||
color: var(--color-red);
|
||||
}
|
||||
swp-form-input {
|
||||
input, select {
|
||||
width: 100%;
|
||||
padding: var(--spacing-5) var(--spacing-6);
|
||||
font-size: var(--font-size-base);
|
||||
font-family: var(--font-family);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-surface);
|
||||
transition: border-color var(--transition-fast);
|
||||
|
||||
swp-form-input input,
|
||||
swp-form-input select {
|
||||
width: 100%;
|
||||
padding: var(--spacing-5) var(--spacing-6);
|
||||
font-size: var(--font-size-base);
|
||||
font-family: var(--font-family);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-surface);
|
||||
transition: border-color var(--transition-fast);
|
||||
}
|
||||
|
||||
swp-form-input input:focus,
|
||||
swp-form-input select:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swp-auto-id {
|
||||
|
|
@ -655,20 +653,22 @@ swp-auto-id {
|
|||
/* ===========================================
|
||||
NOTE FIELD
|
||||
=========================================== */
|
||||
swp-note-field textarea {
|
||||
width: 100%;
|
||||
min-height: 80px;
|
||||
padding: var(--spacing-6);
|
||||
font-size: var(--font-size-base);
|
||||
font-family: var(--font-family);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
resize: vertical;
|
||||
}
|
||||
swp-note-field {
|
||||
textarea {
|
||||
width: 100%;
|
||||
min-height: 80px;
|
||||
padding: var(--spacing-6);
|
||||
font-size: var(--font-size-base);
|
||||
font-family: var(--font-family);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
resize: vertical;
|
||||
|
||||
swp-note-field textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-teal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swp-note-hint {
|
||||
|
|
@ -701,32 +701,28 @@ swp-checkbox-field {
|
|||
background: var(--color-background-alt);
|
||||
border-radius: var(--radius-lg);
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
swp-checkbox-field input[type="checkbox"] {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-top: var(--spacing-1);
|
||||
accent-color: var(--color-teal);
|
||||
cursor: pointer;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-top: var(--spacing-1);
|
||||
accent-color: var(--color-teal);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
swp-checkbox-field label {
|
||||
font-size: var(--font-size-md);
|
||||
color: var(--color-text);
|
||||
cursor: pointer;
|
||||
line-height: var(--line-height-normal);
|
||||
label {
|
||||
font-size: var(--font-size-md);
|
||||
color: var(--color-text);
|
||||
cursor: pointer;
|
||||
line-height: var(--line-height-normal);
|
||||
}
|
||||
}
|
||||
|
||||
/* Card footer base styles in components.css */
|
||||
|
||||
swp-actions-right {
|
||||
display: flex;
|
||||
gap: var(--spacing-5);
|
||||
}
|
||||
|
||||
/* Button styles in components.css */
|
||||
|
||||
/* ===========================================
|
||||
SYSTEM NOTE
|
||||
=========================================== */
|
||||
|
|
@ -747,17 +743,21 @@ swp-system-note {
|
|||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
/* Table columns defined on parent - subgrid inherits */
|
||||
swp-cash-table {
|
||||
grid-template-columns: 50px 80px 1fr 100px 110px 120px 40px;
|
||||
}
|
||||
|
||||
/* Hide some columns on smaller screens */
|
||||
swp-cash-th:nth-child(3),
|
||||
swp-cash-td:nth-child(3),
|
||||
swp-cash-th:nth-child(6),
|
||||
swp-cash-td:nth-child(6) {
|
||||
display: none;
|
||||
swp-cash-th, swp-cash-td {
|
||||
&:nth-child(3),
|
||||
&:nth-child(6) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
swp-cash-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue