feat(SW-2144): added back-to-top button on destination map views
Approved-by: Matilda Landström
This commit is contained in:
@@ -1,38 +1,33 @@
|
||||
.backToTopButton {
|
||||
border-radius: var(--Corner-radius-rounded);
|
||||
display: inline-flex;
|
||||
padding: var(--Space-x1);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: var(--Space-x05);
|
||||
width: max-content;
|
||||
color: var(--Component-Button-Brand-Secondary-On-fill-Default);
|
||||
background-color: var(--Component-Button-Brand-Secondary-Fill-Inverted);
|
||||
border: 2px solid var(--Component-Button-Brand-Secondary-Border-Default);
|
||||
border-radius: var(--Corner-radius-Rounded);
|
||||
box-shadow: 0px 0px 8px 3px rgba(0, 0, 0, 0.1);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
z-index: var(--back-to-top-button);
|
||||
background-color: var(--Base-Surface-Primary-light-Normal);
|
||||
color: var(--Base-Button-Secondary-On-Fill-Normal);
|
||||
border: 2px solid var(--Base-Button-Secondary-On-Fill-Normal);
|
||||
gap: var(--Spacing-x-half);
|
||||
padding: var(--Spacing-x1);
|
||||
text-align: center;
|
||||
transition:
|
||||
background-color 300ms ease,
|
||||
color 300ms ease;
|
||||
font-family: var(--typography-Body-Bold-fontFamily);
|
||||
font-weight: 500;
|
||||
font-size: var(--typography-Caption-Bold-fontSize);
|
||||
line-height: var(--typography-Caption-Bold-lineHeight);
|
||||
letter-spacing: 0.084px;
|
||||
text-decoration: none;
|
||||
}
|
||||
position: sticky;
|
||||
bottom: var(--Space-x2);
|
||||
|
||||
.backToTopButtonText {
|
||||
display: none;
|
||||
&:hover {
|
||||
color: var(--Component-Button-Brand-Secondary-On-fill-Inverted);
|
||||
background-color: var(
|
||||
--Component-Button-Brand-Secondary-Fill-Hover-Inverted
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
.left {
|
||||
left: 32px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.right {
|
||||
right: 32px;
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
.center {
|
||||
@@ -40,18 +35,14 @@
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.backToTopButtonText {
|
||||
display: initial;
|
||||
}
|
||||
.backToTopButton:hover {
|
||||
background-color: var(--Base-Button-Tertiary-Fill-Normal);
|
||||
color: var(--Base-Button-Tertiary-On-Fill-Hover);
|
||||
}
|
||||
.backToTopButton:hover > svg * {
|
||||
fill: var(--Base-Button-Tertiary-On-Fill-Hover);
|
||||
}
|
||||
.backToTopButton {
|
||||
padding: calc(var(--Spacing-x1) + 2px) var(--Spacing-x2);
|
||||
@media screen and (max-width: 767px) {
|
||||
.text {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
.backToTopButton {
|
||||
padding: 10px var(--Space-x2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user