Skip to content
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
41 changes: 17 additions & 24 deletions src/atoms/button/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
@use '../../particles/text/styles' as text;
@use '../../particles/box/styles' as box;

@mixin default-hover-states {
&:hover {
background-color: $color-brand-primary-clear90;
}
&:active {
background-color: $color-brand-primary-clear80;
}
}

@layer kiba-structure {
.KibaButton {
display: inline-flex;
Expand Down Expand Up @@ -41,14 +50,7 @@
color: $color-brand-primary;
font-weight: 600;
text-align: center;

&:hover {
background-color: $color-brand-primary-clear90;
}

&:active {
background-color: $color-brand-primary-clear80;
}
@include default-hover-states;

&:focus-visible {
border-color: $color-background-dark50;
Expand Down Expand Up @@ -76,34 +78,25 @@
background-color: $color-brand-primary;
border-color: $color-brand-primary;
color: $color-text-on-brand;
&:hover {
background-color: $color-brand-secondary;
}
&:active {
background-color: var(--kiba-color-brand-secondary-dark10, #158040);
}
}

&.primary:hover {
background-color: $color-brand-secondary;
}

&.primary:active {
background-color: var(--kiba-color-brand-secondary-dark10, #158040);
}

// Secondary variant
&.secondary {
border-color: $color-brand-primary;
@include default-hover-states;
}

// Large variant
&.large {
padding: $padding-wide $padding-wide2;
font-size: 1.2em;
}

// Small variant
&.small {
padding: $padding-narrow $padding;
font-size: 0.8em;
}

// Card variant
&.card {
box-shadow: 0px 8px 8px -6px rgba(0, 0, 0, 0.15);
margin: 0px 4px 12px 4px;
Expand Down
41 changes: 13 additions & 28 deletions src/atoms/inputWrapper/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
@use '../../particles/text/styles' as text;
@use '../../particles/box/styles' as box;

@mixin input-states($hover-color, $focus-color) {
&:hover .KibaInputWrapperInner {
border-color: $hover-color;
}
&.focus .KibaInputWrapperInner,
&:focus-within .KibaInputWrapperInner {
border-color: $focus-color;
}
}

@layer kiba-structure {
.KibaInputWrapper {
display: flex;
Expand Down Expand Up @@ -42,6 +52,7 @@
@layer kiba-theme {
.KibaInputWrapper {
transition-duration: 0.3s;
@include input-states(var(--kiba-color-brand-primary-light10), $color-brand-primary);

& * {
transition-duration: 0.3s;
Expand All @@ -65,16 +76,6 @@
}
}

.KibaInputWrapper:hover .KibaInputWrapperInner {
border-color: var(--kiba-color-brand-primary-light10);
box-shadow: none;
}

.KibaInputWrapper.focus .KibaInputWrapperInner,
.KibaInputWrapper:focus-within .KibaInputWrapperInner {
border-color: $color-brand-primary;
}

.KibaInputWrapper.disabled .KibaInputWrapperInner {
background-color: var(--kiba-color-disabled-light90);
border-color: var(--kiba-color-disabled-light20);
Expand All @@ -96,41 +97,25 @@

// Error variant
.KibaInputWrapper.error {
@include input-states(var(--kiba-color-error-light10), $color-error);
.KibaInputWrapperInner {
background-color: var(--kiba-color-error-light90);
border-color: var(--kiba-color-error-light20);
}

&:hover .KibaInputWrapperInner {
border-color: var(--kiba-color-error-light10);
}

&.focus .KibaInputWrapperInner,
&:focus-within .KibaInputWrapperInner {
border-color: $color-error;
}

.KibaInputWrapperMessage {
color: $color-error;
}
}

// Success variant
.KibaInputWrapper.success {
@include input-states(var(--kiba-color-success-light10), $color-success);
.KibaInputWrapperInner {
background-color: var(--kiba-color-success-light90);
border-color: var(--kiba-color-success-light20);
}

&:hover .KibaInputWrapperInner {
border-color: var(--kiba-color-success-light10);
}

&.focus .KibaInputWrapperInner,
&:focus-within .KibaInputWrapperInner {
border-color: $color-success;
}

.KibaInputWrapperMessage {
color: $color-success;
}
Expand Down
15 changes: 8 additions & 7 deletions src/atoms/link/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
@use '../../particles/text/styles' as text;
@use '../../particles/box/styles' as box;

@mixin default-link-hover {
&:hover {
color: $color-brand-secondary;
}
}

@layer kiba-structure {
.KibaLink {
cursor: pointer;
Expand All @@ -18,10 +24,7 @@
@include box.focusable;
color: $color-brand-primary;
text-decoration: underline;

&:hover {
color: $color-brand-secondary;
}
@include default-link-hover;

&:focus-visible {
@include box.focussed;
Expand All @@ -36,9 +39,7 @@

&:visited {
color: $color-brand-primary;
&:hover {
color: $color-brand-secondary;
}
@include default-link-hover;
}
}
}
30 changes: 16 additions & 14 deletions src/atoms/linkBase/styles.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
@use '../../styles/variables' as *;
@use '../../particles/box/styles' as box;

@mixin hover-states {
&:hover {
background-color: var(--kiba-color-brand-primary-clear90);
}
&:active {
background-color: var(--kiba-color-brand-primary-clear75);
Comment on lines +6 to +9
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hover state background color has been changed from --kiba-color-brand-primary-clear80 to --kiba-color-brand-primary-clear90, and the active state from --kiba-color-brand-primary-clear50 to --kiba-color-brand-primary-clear75. This changes the visual appearance (transparency/opacity) and may not be intentional. If this is meant to be a pure refactoring to fix CSS issues, these color values should remain the same.

Suggested change
background-color: var(--kiba-color-brand-primary-clear90);
}
&:active {
background-color: var(--kiba-color-brand-primary-clear75);
background-color: var(--kiba-color-brand-primary-clear80);
}
&:active {
background-color: var(--kiba-color-brand-primary-clear50);

Copilot uses AI. Check for mistakes.
}
}

@layer kiba-structure {
.KibaLinkBase {
cursor: pointer;
Expand Down Expand Up @@ -28,13 +37,7 @@
.KibaLinkBase {
@include box.default;
@include box.focusable;
opacity: 1;
&:hover {
background-color: var(--kiba-color-brand-primary-clear80);
}
&:active {
background-color: var(--kiba-color-brand-primary-clear50);
}
@include hover-states;
&:focus-visible {
@include box.focussed;
}
Expand All @@ -43,21 +46,20 @@
&:hover {
background-color: $color-disabled-text;
}
&:active {
background-color: $color-disabled-text;
}
}

// Translucent variant
&.translucent {
background-color: transparent;
@include hover-states;
}

// Card variant
&.card {
@include box.card;
margin: 0;
@include hover-states;
}

// Image variant
&.image {
@include hover-states;
&:hover {
opacity: 0.8;
}
Expand Down
3 changes: 0 additions & 3 deletions src/atoms/listItem/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
@include box.default;
@include box.focusable;
padding: $padding-wide $padding-wide;
background-color: transparent;
border-radius: $border-radius $border-radius;
border-width: $border-width;
&.clickable {
&:hover {
background-color: var(--kiba-color-brand-primary-clear90);
Expand Down
3 changes: 0 additions & 3 deletions src/atoms/selectableView/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
> .KibaSelectableView-overlay {
@include box.default;
@include box.focusable;
background-color: transparent;
border-color: transparent;
padding: 0;
}
&:hover > .KibaSelectableView-overlay {
background-color: var(--kiba-color-brand-primary-clear80);
Expand Down
14 changes: 8 additions & 6 deletions src/atoms/switch/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
@use '../../styles/variables' as *;

@mixin active-hover-state {
&:hover {
background-color: $color-brand-secondary;
}
}

@layer kiba-structure {
.KibaSwitch {
cursor: pointer;
Expand All @@ -26,21 +32,17 @@
background-color: $color-background-dark50;
border-radius: 1em;
padding: 0.15em;
@include active-hover-state;
& > .KibaSwitchInner {
width: 1em;
height: 1em;
background-color: $color-background;
border-radius: 50%;
transition: 300ms;
}
&:hover {
background-color: $color-brand-secondary;
}
&.checked {
background-color: $color-brand-primary;
&:hover {
background-color: $color-brand-secondary;
}
@include active-hover-state;
}
&.disabled {
background-color: $color-disabled-light50;
Expand Down
3 changes: 0 additions & 3 deletions src/atoms/titledCollapsibleBox/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@
@include box.default;
@include box.focusable;
border-color: var(--kiba-color-background-dark10);
border-style: solid;
.KibaTitledCollapsibleBoxHeader {
@include text.default;
@include text.bold;
@include box.focusable;
padding: $padding $padding-wide;
background-color: var(--kiba-color-background-dark01);
border: none;
border-radius: 0;
&:hover {
background-color: var(--kiba-color-neutral);
}
Expand Down
10 changes: 1 addition & 9 deletions src/particles/box/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,11 @@
@layer kiba-theme {
.KibaBox {
@include default;
box-shadow: none;
padding: 0;
margin: 0;
outline-style: solid;
outline-color: transparent;
outline-width: 0;
outline-offset: 0;
opacity: 1;
&.transparent { @include transparent; }
&.padded { @include padded; }
&.card { @include card; }
&.bordered { @include bordered; }
&.focusable { @include focusable; border-width: 2px; }
&.focusable { @include focusable; }
&.focussed { @include focussed; }
&.rounded { @include rounded; }
&.unpadded { @include unpadded; }
Expand Down
Loading