Fiddle: tiny updates to fix wierd css issues#238
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors CSS styles across multiple component files to eliminate redundant style declarations and extract common patterns into reusable mixins. The changes aim to fix CSS issues by relying more on the base mixins (box.default, box.focusable) that already define these properties.
Key changes:
- Removed redundant CSS property declarations that duplicate values already defined in base mixins
- Extracted repeated hover/active state patterns into reusable mixins
- Cleaned up unnecessary variant styling overrides
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/particles/box/styles.scss |
Removed redundant property declarations from .focusable class that are already defined in the focusable mixin |
src/atoms/titledCollapsibleBox/styles.scss |
Removed redundant border style declarations already provided by base mixins |
src/atoms/switch/styles.scss |
Extracted hover state into active-hover-state mixin for reuse across checked and unchecked states |
src/atoms/selectableView/styles.scss |
Removed redundant property overrides already defined in base mixins |
src/atoms/listItem/styles.scss |
Removed redundant background, border-radius, and border-width declarations |
src/atoms/linkBase/styles.scss |
Extracted hover and active states into hover-states mixin, removed redundant opacity declaration |
src/atoms/link/styles.scss |
Extracted hover color change into default-link-hover mixin for reuse |
src/atoms/inputWrapper/styles.scss |
Extracted input state logic into parameterized input-states mixin for error, success, and default variants |
src/atoms/button/styles.scss |
Extracted default hover states into default-hover-states mixin, cleaned up variant comments |
Comments suppressed due to low confidence (1)
src/atoms/linkBase/styles.scss:68
- The
&.imagevariant now includes the mixin@include hover-states, but still defines its own:hoverand:activepseudo-classes. This creates duplicate CSS rules where both the mixin and the explicit rules will apply, with the explicit rules overriding the mixin. The explicit hover and active states should either be removed if the mixin behavior is desired, or the mixin should not be included for this variant.
&.image {
@include hover-states;
&:hover {
opacity: 0.8;
}
&:active {
opacity: 0.6;
}
| background-color: var(--kiba-color-brand-primary-clear90); | ||
| } | ||
| &:active { | ||
| background-color: var(--kiba-color-brand-primary-clear75); |
There was a problem hiding this comment.
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.
| 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); |
Description
Screenshots:
Checklist: