Files
smartguide/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.scss
T
Steven Tischer d8041751c5
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev Build queued...
feat(weights-sliders): improve layout of weight labels and icons for better responsiveness
2026-08-15 12:44:00 +02:00

245 lines
4.8 KiB
SCSS

/* weights-sliders.component.scss */
$phone: 599px;
$tablet: 900px;
$touch-target: 44px;
/* ============================================================
CARD
============================================================ */
::ng-deep .weights-card {
background: var(--sg-surface);
border: 1px solid var(--sg-border);
box-shadow: none;
mat-card-content.mat-mdc-card-content {
padding: 0.5rem 0.5rem 0.25rem; /* compact bottom */
border: none;
}
}
/* ============================================================
HEADER
============================================================ */
.weights-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.4rem;
margin-bottom: 0.3rem;
h2 {
margin: 0;
font-size: 0.85rem;
font-weight: 650;
color: var(--sg-text);
}
button {
min-height: $touch-target;
padding: 0.2rem 0.4rem;
font-size: 0.75rem;
line-height: 1.2;
}
}
/* ============================================================
SLIDERS
============================================================ */
.weight-list {
display: flex;
flex-direction: column;
gap: 0.2rem;
margin-top: 0.1rem;
}
::ng-deep .weight-row {
display: grid;
grid-template-columns: 1fr 2fr;
align-items: center;
gap: 0.5rem;
min-height: 34px;
font-size: 0.8rem;
margin-bottom: 0.4rem;
}
::ng-deep .weight-label {
display: flex;
align-items: center;
gap: 0.2rem;
color: var(--sg-text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.icon-small {
font-size: 14px;
width: 14px;
height: 14px;
color: var(--sg-text-muted);
flex-shrink: 0;
}
span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
flex: 1;
min-width: 0;
}
}
::ng-deep .slider-container {
display: flex;
flex-direction: column;
width: 100%;
}
::ng-deep .weight-slider {
width: 100%;
height: 20px;
margin: 0;
}
::ng-deep .slider-labels {
display: flex;
justify-content: space-between;
font-size: 0.65rem;
color: var(--sg-text-muted);
margin-bottom: -4px;
padding: 0 6px;
}
::ng-deep .weight-label .icon-small.name-match-star {
color: var(--sg-warning, #b8860b);
}
/* ============================================================
NAME MATCH NOTE
============================================================ */
.name-match-note {
display: flex;
align-items: center;
gap: 0.3rem;
margin: 0.3rem 0 0;
padding: 0.2rem 0.3rem;
font-size: 0.7rem;
color: var(--sg-text-muted);
mat-icon {
flex: 0 0 auto;
color: var(--sg-warning, #b8860b);
}
}
/* ============================================================
WARNING
============================================================ */
.weight-warning {
display: flex;
align-items: center;
gap: 0.2rem;
margin-top: 0.2rem;
padding: 0.2rem 0.3rem;
border-radius: 3px;
background: var(--sg-warning-soft);
color: var(--sg-warning);
font-size: 0.7rem;
font-weight: 500;
mat-icon {
font-size: 14px;
width: 14px;
height: 14px;
}
}
/* ============================================================
ACTIONS
============================================================ */
.weight-actions {
display: flex;
justify-content: flex-end;
margin-top: 0.3rem;
button {
min-height: $touch-target;
padding: 0.2rem 0.6rem;
font-size: 0.8rem;
}
}
/* ============================================================
TOOLTIP
============================================================ */
.tooltip-sm {
font-size: 0.75rem;
padding: 0.3rem 0.5rem;
max-width: 200px;
border-radius: 3px;
background: var(--sg-surface);
color: var(--sg-text);
box-shadow: var(--sg-shadow-sm);
}
/* ============================================================
TABLET & PHONE
============================================================ */
@media (max-width: $tablet) {
::ng-deep .weight-row {
grid-template-columns: 1fr;
gap: 0.15rem;
padding: 0.1rem 0;
}
::ng-deep .weight-label {
grid-column: 1 / -1;
font-size: 0.75rem;
}
::ng-deep .slider-container {
grid-column: 1 / -1;
}
.weight-actions {
position: sticky;
bottom: 0;
z-index: 5;
background: var(--sg-background);
padding: 0.4rem;
margin: 0.3rem -0.5rem -0.25rem -0.5rem;
box-shadow: var(--sg-shadow-sm);
}
}
@media (max-width: $phone) {
.weights-header {
flex-direction: column;
align-items: flex-start;
gap: 0.2rem;
}
::ng-deep .weight-row {
gap: 0.1rem;
min-height: 30px;
}
::ng-deep .weight-label {
font-size: 0.7rem;
}
::ng-deep .weight-slider {
height: 18px;
}
::ng-deep .slider-labels {
font-size: 0.6rem;
}
.weight-actions {
padding: 0.3rem;
margin: 0.2rem -0.4rem -0.2rem -0.4rem;
}
}