Skip to content

Commit

Permalink
fix(kinput): update readonly styles [KHCP-10785]
Browse files Browse the repository at this point in the history
  • Loading branch information
portikM committed Feb 20, 2024
1 parent 714797b commit 7f2bb7b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/styles/mixins/_input-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,17 @@
box-shadow: var(--kui-shadow-border-primary, $kui-shadow-border-primary), var(--kui-shadow-focus, $kui-shadow-focus);
}

// shared styles between disabled and readonly states
@mixin inputDisabledReadOnly {
background-color: var(--kui-color-background-disabled, $kui-color-background-disabled);
box-shadow: var(--kui-shadow-border-disabled, $kui-shadow-border-disabled);
color: var(--kui-color-text-disabled, $kui-color-text-disabled);
}

@mixin inputDisabled {
@include inputDisabledReadOnly;

background-color: var(--kui-color-background-disabled, $kui-color-background-disabled) !important;
box-shadow: var(--kui-shadow-border-disabled, $kui-shadow-border-disabled) !important;
color: var(--kui-color-text-disabled, $kui-color-text-disabled) !important;
cursor: not-allowed;
}

@mixin inputReadOnly {
@include inputDisabledReadOnly;
background-color: var(--kui-color-background-neutral-weakest, $kui-color-background-neutral-weakest);
box-shadow: var(--kui-shadow-border, $kui-shadow-border);
color: var(--kui-color-text-neutral-strong, $kui-color-text-neutral-strong);
}

// error state styles
Expand Down

0 comments on commit 7f2bb7b

Please sign in to comment.