Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Darkside] Spacing -> Space update for CSS #3478

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions @navikt/core/css/darkside/accordion.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
display: flex;
justify-content: flex-start;
align-items: flex-start;
gap: var(--ax-spacing-3);
padding: var(--ax-spacing-3);
gap: var(--ax-space-12);
padding: var(--ax-space-12);
text-align: left;
cursor: pointer;
border: none;
Expand Down Expand Up @@ -119,7 +119,7 @@
.navds-accordion__content {
--__acx-accordion-content-line-width: 2px;

padding-inline: var(--ax-spacing-6) var(--ax-spacing-3);
padding-inline: var(--ax-space-24) var(--ax-space-12);
display: none;
overflow: hidden;
padding-block: 0;
Expand Down Expand Up @@ -148,15 +148,15 @@
}

.navds-accordion--indent > .navds-accordion__item > .navds-accordion__content {
padding-inline: var(--ax-spacing-6) var(--ax-spacing-3);
padding-inline: var(--ax-space-24) var(--ax-space-12);
}

.navds-accordion--indent > .navds-accordion__item .navds-accordion__content-inner {
box-shadow: -2px 0 0 0 var(--ax-border-subtleA);
padding-block: var(--ax-spacing-2);
padding-block: var(--ax-space-8);

/* Aligns content with heading-section */
padding-inline: calc(var(--ax-spacing-5) + 2px) var(--ax-spacing-5);
padding-inline: calc(var(--ax-space-20) + 2px) var(--ax-space-20);

@media (forced-colors: active) {
border-left: 1px solid canvastext;
Expand All @@ -168,8 +168,8 @@
opacity: 1;
overflow: visible;
max-height: fit-content;
padding-block: var(--ax-spacing-2);
padding-block-end: var(--ax-spacing-6);
padding-block: var(--ax-space-8);
padding-block-end: var(--ax-space-24);
border-color: var(--ax-border-subtleA);
}

Expand Down
20 changes: 10 additions & 10 deletions @navikt/core/css/darkside/action-menu.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
}

.navds-action-menu__content > .navds-action-menu__content-inner {
--__axc-action-menu-content-p: var(--ax-spacing-2);
--__axc-action-menu-item-pr: var(--ax-spacing-2);
--__axc-action-menu-item-pl: var(--ax-spacing-2);
--__axc-action-menu-content-p: var(--ax-space-8);
--__axc-action-menu-item-pr: var(--ax-space-8);
--__axc-action-menu-item-pl: var(--ax-space-8);
--__axc-action-menu-item-height: 2rem;

border-radius: var(--ax-border-radius-large);
Expand All @@ -57,7 +57,7 @@
.navds-action-menu__item {
display: flex;
align-items: center;
gap: var(--ax-spacing-2);
gap: var(--ax-space-8);
min-height: var(--__axc-action-menu-item-height);
cursor: default;
border-radius: var(--ax-border-radius-medium);
Expand Down Expand Up @@ -87,11 +87,11 @@
}

.navds-action-menu__item--has-icon {
--__axc-action-menu-item-pl: var(--ax-spacing-6);
--__axc-action-menu-item-pl: var(--ax-space-24);
}

.navds-action-menu__sub-trigger {
--__axc-action-menu-item-pr: var(--ax-spacing-05);
--__axc-action-menu-item-pr: var(--ax-space-2);

&[data-state="open"] {
background-color: var(--ax-bg-neutral-moderate-pressed);
Expand All @@ -115,12 +115,12 @@
.navds-action-menu__marker {
display: flex;
align-items: center;
gap: var(--ax-spacing-1);
gap: var(--ax-space-4);
}

.navds-action-menu__marker--right {
margin-left: auto;
padding-left: var(--ax-spacing-4);
padding-left: var(--ax-space-16);
}

.navds-action-menu__marker--left {
Expand All @@ -141,7 +141,7 @@
background-color: var(--ax-bg-neutral-moderateA);
color: var(--ax-text-default);
border-radius: var(--ax-border-radius-small);
padding: 0 var(--ax-spacing-1);
padding: 0 var(--ax-space-4);
min-width: 1.125rem;
height: 1.125rem;
line-height: 1;
Expand All @@ -167,7 +167,7 @@

.navds-action-menu__divider {
height: 1px;
margin-block: var(--ax-spacing-2);
margin-block: var(--ax-space-8);
background-color: var(--ax-border-subtleA);
}

Expand Down
16 changes: 8 additions & 8 deletions @navikt/core/css/darkside/alert.darkside.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.navds-alert {
border-radius: var(--ax-border-radius-xlarge);
border: 1px solid;
padding: var(--ax-spacing-4) var(--ax-spacing-5);
padding: var(--ax-space-16) var(--ax-space-20);
display: flex;
gap: var(--ax-spacing-3);
gap: var(--ax-space-12);
align-items: center;

@media (forced-colors: active) {
Expand All @@ -25,8 +25,8 @@
}

.navds-alert--small {
padding: var(--ax-spacing-3) var(--ax-spacing-4);
gap: var(--ax-spacing-2);
padding: var(--ax-space-12) var(--ax-space-16);
gap: var(--ax-space-8);

> .navds-alert__icon {
margin-block-start: 0;
Expand Down Expand Up @@ -94,22 +94,22 @@

.navds-alert--close-button {
> .navds-alert__wrapper {
margin-block-start: var(--ax-spacing-05);
margin-block-start: var(--ax-space-2);
}

> .navds-alert__icon {
margin-block-start: var(--ax-spacing-05);
margin-block-start: var(--ax-space-2);
}

&.navds-alert--small {
align-items: flex-start;

> .navds-alert__wrapper {
margin-block-start: var(--ax-spacing-1);
margin-block-start: var(--ax-space-4);
}

> .navds-alert__icon {
margin-block-start: var(--ax-spacing-1);
margin-block-start: var(--ax-space-4);
}
}
}
16 changes: 8 additions & 8 deletions @navikt/core/css/darkside/button.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--__axc-button-border-color: transparent;
--__axc-button-border-width: 2px;

padding: var(--ax-spacing-3) var(--ax-spacing-5);
padding: var(--ax-space-12) var(--ax-space-20);
border-radius: var(--ax-border-radius-medium);
display: inline-flex;
cursor: pointer;
Expand All @@ -13,7 +13,7 @@
background: none;
align-items: center;
justify-content: center;
gap: var(--ax-spacing-2);
gap: var(--ax-space-8);
box-shadow: inset 0 0 0 var(--__axc-button-border-width) var(--__axc-button-border-color);

&:focus-visible {
Expand All @@ -29,25 +29,25 @@
}

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

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

.navds-button--icon-only {
padding: var(--ax-spacing-3);
padding: var(--ax-space-12);

&.navds-button--small {
padding: var(--ax-spacing-1);
padding: var(--ax-space-4);
}

&.navds-button--xsmall {
padding: var(--ax-spacing-05);
padding: var(--ax-space-2);
}
}

Expand Down
12 changes: 6 additions & 6 deletions @navikt/core/css/darkside/chat.darkside.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.navds-chat {
display: flex;
align-items: flex-end;
gap: var(--ax-spacing-3);
gap: var(--ax-space-12);
max-width: 40.75rem;
}

Expand Down Expand Up @@ -50,23 +50,23 @@
padding: 0;
display: flex;
flex-direction: column;
gap: var(--ax-spacing-3);
gap: var(--ax-space-12);
}

.navds-chat__bubble {
padding: var(--ax-spacing-4) var(--ax-spacing-5);
padding: var(--ax-space-16) var(--ax-space-20);
width: fit-content;
background-color: var(--ax-bg-raised);
display: flex;
flex-direction: column;
gap: var(--ax-spacing-2);
gap: var(--ax-space-8);
border-radius: var(--ax-border-radius-xlarge);
border-bottom-left-radius: var(--ax-border-radius-small);
border: 1px solid var(--ax-border-subtleA);
}

.navds-chat--small .navds-chat__bubble {
padding: var(--ax-spacing-3) var(--ax-spacing-4);
padding: var(--ax-space-12) var(--ax-space-16);
}

/* -------------------------- Chat bubble variants -------------------------- */
Expand All @@ -88,7 +88,7 @@
.navds-chat__top-text {
color: var(--ax-text-default);
display: flex;
gap: var(--ax-spacing-2);
gap: var(--ax-space-8);
align-items: baseline;
font-weight: normal;
margin: 0;
Expand Down
18 changes: 9 additions & 9 deletions @navikt/core/css/darkside/chips.darkside.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.navds-chips {
display: flex;
gap: var(--ax-spacing-2);
gap: var(--ax-space-8);
margin: 0;
padding: 0;
list-style: none;
Expand All @@ -20,9 +20,9 @@
cursor: pointer;
align-items: center;
justify-content: center;
gap: var(--ax-spacing-05);
gap: var(--ax-space-2);
margin: 0;
padding: 0 var(--ax-spacing-3);
padding: 0 var(--ax-space-12);
text-decoration: none;
border-radius: var(--ax-border-radius-full);
min-height: 2rem;
Expand All @@ -42,7 +42,7 @@
.navds-chips--small {
.navds-chips__chip {
min-height: 1.5rem;
padding: 0 var(--ax-spacing-2);
padding: 0 var(--ax-space-8);
}

.navds-chips__toggle-icon {
Expand All @@ -51,7 +51,7 @@
}

.navds-chips__toggle--with-checkmark {
padding-left: var(--ax-spacing-1);
padding-left: var(--ax-space-4);
}

.navds-chips__removable-icon {
Expand All @@ -64,7 +64,7 @@
}

.navds-chips--icon-right {
padding-right: var(--ax-spacing-05);
padding-right: var(--ax-space-2);
}
}

Expand Down Expand Up @@ -110,7 +110,7 @@
}

.navds-chips--medium .navds-chips__toggle--with-checkmark {
padding-left: var(--ax-spacing-1-alt);
padding-left: var(--ax-space-6);
}

/* -------------------------- start old CSS -------------------------- */
Expand Down Expand Up @@ -148,11 +148,11 @@
}

.navds-chips--icon-left {
padding-left: var(--ax-spacing-1-alt);
padding-left: var(--ax-space-6);
}

.navds-chips--icon-right {
padding-right: var(--ax-spacing-1-alt);
padding-right: var(--ax-space-6);
}

@media (forced-colors: active) {
Expand Down
Loading
Loading