Skip to content

Commit

Permalink
KAW-7680 Refactor after CR
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaszDziezykNetcentric committed Jul 25, 2024
1 parent ba259df commit 8038410
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions blocks/footer/footer.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
footer {
background-color: #222;
color: #fff;
color: var(--c-primary-white);
}

.footer .section {
Expand Down Expand Up @@ -59,19 +59,19 @@ footer {
}

.footer .footer-list-item a {
color: #fff;
color: var(--c-primary-white);
display: flex;
gap: 15px;
align-items: center;
}

.footer .footer-list-item a:hover,
.footer .footer-list-item a:active {
color: #fff;
color: var(--c-primary-white);
text-decoration: none;
}

.footer #back-to-top {
.footer .back-to-top {
position: relative;
display: flex;
flex-direction: column;
Expand All @@ -86,12 +86,12 @@ footer {
line-height: 24px;
}

.footer #back-to-top:hover,
.footer #back-to-top:focus {
.footer .back-to-top:hover,
.footer .back-to-top:focus {
color: rgb(255 255 255 / 70%);
}

.footer #back-to-top svg {
.footer .back-to-top svg {
padding: 5px;
}

Expand Down
4 changes: 2 additions & 2 deletions blocks/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ export default async function decorate(block) {
const backToTopText = getTextLabel('top');

const backToTopNode = document.createRange().createContextualFragment(`
<button id="back-to-top">
<button class="back-to-top">
${backToTopIcon}
<span>${backToTopText}</span>
</button>
`);

footer.querySelector('.section:last-child').prepend(backToTopNode);

footer.querySelector('#back-to-top').addEventListener('click', () => {
footer.querySelector('.back-to-top').addEventListener('click', () => {
window.scrollTo({
top: 0,
behavior: 'smooth',
Expand Down

0 comments on commit 8038410

Please sign in to comment.