Skip to content

Commit

Permalink
vertical align basket.js
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaNerlich committed Mar 15, 2024
1 parent 0823afa commit 33c3d98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions css/components/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ header > a.basket-badge {
background-color: unset;
}

header > a.basket-badge > svg {
vertical-align: top;
}

header > a.basket-badge > span,
header > a.basket-badge > strong {
vertical-align: middle;
}

header > nav > ul {
list-style: none;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion js/basket.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async function updateBadge() {
anchor.innerHTML = (numProducts > 0) ? "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"#000000\" viewBox=\"0 0 256 256\">\n" +
" <path\n" +
" d=\"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V72H40V56Zm0,144H40V88H216V200Zm-40-88a48,48,0,0,1-96,0,8,8,0,0,1,16,0,32,32,0,0,0,64,0,8,8,0,0,1,16,0Z\"></path>\n" +
"</svg> | <strong>" + numProducts + "</strong>" : "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"#000000\" viewBox=\"0 0 256 256\">\n" +
"</svg> <span>|</span> <strong>" + numProducts + "</strong>" : "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"#000000\" viewBox=\"0 0 256 256\">\n" +
" <path\n" +
" d=\"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V72H40V56Zm0,144H40V88H216V200Zm-40-88a48,48,0,0,1-96,0,8,8,0,0,1,16,0,32,32,0,0,0,64,0,8,8,0,0,1,16,0Z\"></path>\n" +
"</svg>";
Expand Down

0 comments on commit 33c3d98

Please sign in to comment.