I'm currently customizing a left toggler button that uses the bi-list icon. When hovered over, the icon increases by 5px, but this increase also affects the size of the button, causing responsiveness issues in my navbar. How can I dynamically adjust the padding inside the button to accommodate for the changing size of the icon?
Not Hovered Over:
https://i.sstatic.net/7F51XWeK.png
Hovered Over:
https://i.sstatic.net/AJnwg2E8.png
("use strict");
// Navbar Dropdown
$(".dropdown-toggle").click(function() {
$(this).next(".dropdown-menu").slideToggle(600);
});
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");
@import url("https://cdn.jsdelivr.net/npm/font/bootstrap-icons.min.css");
header {
background: black;
}
/*navbar styles here*/
/*dropdown styles here*/
/*icon styles here*/
It is the left toggler button I'm currently working on right now.
I have experimented with using scale() and the calc() function.