Skip to content

Commit

Permalink
Add background to readOnly inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos committed Sep 12, 2018
1 parent 08f2d45 commit 023e85b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/components/form/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
}

/**
* 1. Ensure the icon padding remains when in readOnly mode
* 2. Account for inner box-shadow style border when in group
* 3. Must supply both values to background-size or some browsers apply the single value to both directions
*/
Expand Down Expand Up @@ -45,16 +44,12 @@
@mixin euiFormControlWithIcon($isIconOptional: false, $side: "left") {
@if ($isIconOptional) {
@at-root {
#{&}--withIcon,
#{&}--withIcon[readOnly] /* 1 */ {
#{&}--withIcon {
@include euiFormControlLayout__padding(1, $side);
}
}
} @else {
&,
&[readOnly] /* 1 */ {
@include euiFormControlLayout__padding(1, $side);
}
@include euiFormControlLayout__padding(1, $side);
}
}

Expand Down Expand Up @@ -124,10 +119,10 @@

@mixin euiFormControlReadOnlyStyle {
cursor: default;
background: transparent;
// Use transparency since there is no border and in case form is on a non-white background
background: transparentize($euiColorLightShade, .88);
border-color: transparent;
box-shadow: none;
padding-left: 0; // line up text with label
}

/**
Expand Down

0 comments on commit 023e85b

Please sign in to comment.