digitransit-ui/digitransit-component/packages/digitransit-component-suggestion-item/src/helpers/styles.scss
Vesa Meskanen 1cc819a8be fix: render arrows using theme color
All themes used HSL color
2026-01-11 13:08:59 +02:00

244 lines
4 KiB
SCSS

@import '~@hsl-fi/sass/colors';
@import '~@hsl-fi/sass/mixins/screen';
@import '~@hsl-fi/sass/mixins/text';
.suggestion-item-container {
display: flex;
min-height: 25px;
&.futureroute {
min-height: 79px;
}
}
.mobile {
height: 59px;
margin: 0 10px;
&.CurrentLocation {
height: 50px;
}
&.SelectFromMap {
height: 50px;
}
}
li:not(:first-child) > div.suggestion-item-container {
border-top: 1px solid #ddd;
}
li:last-child > div.suggestion-item-container.mobile {
border-top: none;
}
.search-result {
display: flex;
flex-direction: row;
align-items: center;
min-height: 49px;
&.futureroute {
min-height: 79px;
}
.suggestion-result {
display: flex;
width: 100%;
flex-direction: column;
position: absolute;
padding-left: 49px;
padding-right: 27px;
.suggestion-name {
margin: 0;
font-weight: var(--font-weight-medium);
color: #333;
font-size: 15px !important;
letter-spacing: -0.5px;
line-height: 1.5;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@include min-width(tablet) {
font-size: 13px !important;
letter-spacing: -0.43px;
line-height: 1;
}
&.futureroute {
line-height: 1.33;
position: relative;
left: 2px;
&.normal {
font-weight: normal;
position: relative;
left: 0.5px;
}
}
}
.suggestion-label {
margin: 0;
color: #666;
font-size: 13px !important;
font-weight: 400;
letter-spacing: -0.43px;
line-height: 1.38;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
position: relative;
top: -1px;
@include min-width(tablet) {
font-size: 11px !important;
letter-spacing: -0.37px;
line-height: 1.64;
}
.stop-code {
border-radius: 3px;
font-size: 9px;
padding: 1px 2px 1px;
font-weight: var(--font-weight-medium);
border: 1px solid #ddd;
margin: 0 4px;
}
.platform {
display: inline-block;
background: #f2f5f7;
color: #333;
border-radius: 3px;
font-weight: 500;
text-align: center;
margin-left: 5px;
height: 16px;
width: 24px;
align-self: center;
font-family: 'Gotham XNarrow SSm A', 'Gotham XNarrow SSm B',
'Roboto Condensed', Arial, Georgia, serif;
}
&.futureroute {
height: 18px;
position: relative;
left: 2px;
top: 4px;
}
}
}
.arrow-icon {
display: flex;
width: 27px;
align-items: center;
position: absolute;
right: 0;
svg {
width: 17px;
height: 17px;
}
&.mobile {
&.fill-input {
border-left: 1px solid #ddd;
width: 48px;
height: 40px;
padding-right: 10px;
padding-left: 20px;
}
svg {
width: 12px;
height: 21px;
}
right: -9px;
}
}
}
.suggestion-icon {
width: 49px;
text-align: center;
padding-top: 6px;
// Default size
svg {
width: 22px;
height: 22px;
}
.place,
.busstop,
.select-from-map {
svg {
width: 24px;
height: 24px;
}
}
.locate,
.edit {
svg {
width: 22px;
height: 22px;
}
}
.star,
.work {
svg {
width: 20px;
height: 20px;
}
}
.school,
.sport,
.shopping {
svg {
width: 18px;
height: 18px;
}
}
.arrow {
svg {
width: 17px;
height: 17px;
transform: rotate(180deg);
}
}
.future-route {
svg {
width: 32px;
height: 32px;
position: relative;
top: -11px;
}
}
.station {
svg {
width: 25px;
height: 24px;
}
}
}
.sr-only:not(:focus, :active) {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}