Skip to content

Commit

Permalink
🐛 Fix icon sizing for buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh committed Jan 20, 2025
1 parent 106deb3 commit 87b02f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
4 changes: 3 additions & 1 deletion @navikt/core/css/darkside/button.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@
.navds-button--small,
.navds-button--xsmall {
--__axc-button-icon-margin: -2px;
--__axc-button-icon-size: 1.25rem;
}

.navds-button--small {
padding: var(--ax-space-4) var(--ax-space-12);
min-height: 2rem;
min-width: 2rem;
gap: var(--ax-space-6);
}

.navds-button--xsmall {
padding: var(--ax-space-2) var(--ax-space-8);
gap: var(--ax-space-4);

--__axc-button-icon-size: 1.25rem;
}

.navds-button--icon-only {
Expand Down
22 changes: 3 additions & 19 deletions @navikt/core/css/darkside/copybutton.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,8 @@
--__axc-copybutton-padding: var(--ax-space-4);
}

& .navds-copybutton__icon {
font-size: 1.25rem;
}

& > .navds-copybutton__content {
gap: var(--ax-space-6);
gap: var(--ax-space-4);
}
}

Expand All @@ -96,26 +92,14 @@
}

& > .navds-copybutton__content {
gap: var(--ax-space-4);
gap: var(--ax-space-2);
}
}

/* ----------------------------- CopyButton Icon ---------------------------- */
.navds-copybutton__icon {
font-size: 1.5rem;
display: flex;

&:first-of-type {
margin-left: -0.25rem;
}

&:last-of-type {
margin-right: -0.25rem;
}

&:only-child {
margin: 0;
}
}

.navds-copybutton--active .navds-copybutton__icon {
Expand Down Expand Up @@ -166,5 +150,5 @@
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--ax-space-8);
gap: var(--ax-space-6);
}

0 comments on commit 87b02f4

Please sign in to comment.