digitransit-ui/sass/base/_elements.scss
2024-01-15 16:10:19 +02:00

376 lines
5.3 KiB
SCSS

$border-radius-rounded: 30px;
/* Card */
.card {
background-color: $white;
border: 1px solid $light-gray;
border-radius: $border-radius;
margin-bottom: 5px;
line-height: $line-height-normal;
overflow-x: hidden;
}
.card-header {
background-color: $white;
padding: 0.4em 0 0.5em;
.card-header-content {
display: flex;
flex-direction: row;
align-items: center;
.card-header-wrapper {
flex-grow: 1;
}
}
.zone-icon-container {
align-items: center;
color: $primary-color;
display: flex;
font-size: $font-size-xxsmall;
font-weight: $font-weight-medium;
.unknown {
display: block;
height: 2em;
width: 2em;
}
}
.h3 {
margin-top: -10px;
}
.card-sub-header {
display: flex;
p {
display: inline;
margin-right: 2px;
height: 18px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 1.38;
letter-spacing: -0.43px;
}
.card-code {
border: 1px solid $light-gray;
border-radius: $border-radius;
font-size: 11px;
color: #666;
margin-right: 3px;
margin-left: 4px;
padding: 0 5px 0 5px;
letter-spacing: -0.37px;
height: 16px;
}
}
}
/* buttons */
.show-more {
text-align: center;
text-transform: uppercase;
border-radius: $border-radius-rounded;
background: $gray-blue-light;
color: $white;
font-family: $button-font-family;
font-weight: $font-weight-medium;
font-size: $font-size-small;
width: 100%;
height: 40px;
margin-top: 20px;
padding: 0;
&:hover,
&:focus {
background-color: $gray-blue-light;
outline: 0;
}
}
/* Modal */
#app .modal {
border-radius: $border-radius;
cursor: auto;
height: 85%;
max-height: 85%;
padding: 0;
.modal-content {
height: 100%;
max-height: calc(100% - 5em);
}
.modal-top-nav {
display: flex;
justify-content: space-between;
padding: 0.5em;
h2 {
margin: $padding-xsmall 0;
}
}
}
/* ICONS */
.icon {
display: inline-block;
width: 1em;
height: 1em;
fill: currentcolor;
&.caution {
color: $white;
fill: $disruption-color;
}
&.info {
color: $gray-blue;
}
&.inline-icon {
margin-left: $padding-xsmall;
position: relative;
top: 0.125em;
}
}
.favourite-icon {
padding: 0;
background: white;
stroke: #ddd;
fill: transparent;
.icon.favourite {
height: 30px;
width: 30px;
stroke: #ddd;
fill: white;
&.selected {
stroke: transparent;
}
&:hover {
stroke: #bbb;
}
&.selected:hover {
stroke: transparent;
}
}
&:hover {
background: transparent;
}
}
.fullscreen-toggle {
position: absolute;
height: 34px;
background: rgba(0, 0, 0, 0.5);
width: 34px;
top: -3em;
right: 10px;
font-size: 17px;
border-radius: $border-radius;
z-index: index($zindex, map-fullscreen-toggle);
.icon {
margin: 0.5em 0.5em 0 0.5em;
fill: rgb(255, 255, 255);
}
&.expanded {
top: -3em;
}
&.routePage,
&.itineraryPage {
bottom: 1.5em;
top: auto;
}
&.stopPage {
bottom: 2em;
top: auto;
&.expanded {
bottom: 2em;
top: auto;
}
}
}
.smallscreen-toggle {
@extend .fullscreen-toggle;
bottom: -1px;
}
.prefix-icon {
margin-right: 6px;
}
.dotted-link {
border-bottom: 2px dotted rgba(255, 255, 255, 0.5);
}
.overflow-fade {
overflow: hidden;
mask-image: linear-gradient(
to left,
transparent,
rgba(0, 0, 0, 0.2) 5px,
rgba(0, 0, 0, 1) 25px,
rgba(0, 0, 0, 1)
);
}
.overflow-fade-left {
overflow: hidden;
mask-image: linear-gradient(
to right,
transparent,
rgba(0, 0, 0, 0.2) 5px,
rgba(0, 0, 0, 1) 25px,
rgba(0, 0, 0, 1)
);
}
.double-overflow-fade {
overflow: hidden;
mask-image: linear-gradient(
to right,
transparent,
rgba(0, 0, 0, 0.2) 2%,
rgba(0, 0, 0, 1) 5%,
rgba(0, 0, 0, 1) 95%,
rgba(0, 0, 0, 0.2) 98%
);
}
@keyframes realtimeInnerArch {
0% {
opacity: 1;
}
20% {
opacity: 1;
}
40% {
opacity: 0;
}
60% {
opacity: 1;
}
100% {
opacity: 1;
}
}
@keyframes realtimeOuterArch {
0% {
opacity: 1;
}
20% {
opacity: 1;
}
40% {
opacity: 0;
}
60% {
opacity: 0;
}
80% {
opacity: 1;
}
100% {
opacity: 1;
}
}
svg.realtime-icon {
transform: translate3d(0, 0, 0);
}
#icon-icon_realtime {
color: $realtime-color;
}
#icon-icon_realtime path {
animation-duration: 2s;
animation-iteration-count: infinite;
animation-timing-function: step-start;
fill: currentcolor;
&.path1 {
animation-name: realtimeInnerArch;
}
&.path2 {
animation-name: realtimeOuterArch;
}
}
@keyframes locationIcon {
0% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.4;
}
75% {
opacity: 0.1;
}
100% {
opacity: 0;
transform: scale(3);
}
}
.icon-badge {
display: inline-block;
height: 1em;
position: absolute;
width: 1em;
> .badge-circle {
stroke: #fff;
stroke-width: 2.5;
}
> .badge-text {
font-family: $font-family-narrow;
font-size: 22px;
font-weight: $font-weight-medium;
text-anchor: middle;
&.long {
font-size: 1.5rem;
}
}
}
.swipeable-tab {
&.inactive {
// just an arbitrary small value
max-height: 1px;
}
}