Skip to content

Commit

Permalink
Merge pull request #473 from kiwicom/fix/ie-textarea-boxshadow-scrollbar
Browse files Browse the repository at this point in the history
FIX: IE - Textarea box-shadow and scrollbar
  • Loading branch information
tomashapl authored Oct 11, 2018
2 parents d9b07aa + 256477c commit bd022a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/Textarea/__snapshots__/Textarea.stories.storyshot
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ exports[`Storyshots Textarea Default 1`] = `
data-test={undefined}
>
<textarea
className="Textarea__StyledTextArea-iLqCZR kfzwzn"
className="Textarea__StyledTextArea-iLqCZR ggVGGf"
disabled={undefined}
maxLength={undefined}
name={undefined}
Expand Down Expand Up @@ -386,7 +386,7 @@ exports[`Storyshots Textarea Playground 1`] = `
</span>
</span>
<textarea
className="Textarea__StyledTextArea-iLqCZR hcwkQS"
className="Textarea__StyledTextArea-iLqCZR doQANg"
disabled={true}
maxLength={undefined}
name={undefined}
Expand Down Expand Up @@ -961,7 +961,7 @@ exports[`Storyshots Textarea Small size 1`] = `
data-test={undefined}
>
<textarea
className="Textarea__StyledTextArea-iLqCZR jROCSV"
className="Textarea__StyledTextArea-iLqCZR cLYVha"
disabled={undefined}
maxLength={undefined}
name={undefined}
Expand Down Expand Up @@ -1275,7 +1275,7 @@ exports[`Storyshots Textarea With error 1`] = `
data-test={undefined}
>
<textarea
className="Textarea__StyledTextArea-iLqCZR aHzeJ"
className="Textarea__StyledTextArea-iLqCZR hywnZl"
disabled={undefined}
maxLength={undefined}
name={undefined}
Expand Down Expand Up @@ -1595,7 +1595,7 @@ exports[`Storyshots Textarea With help 1`] = `
data-test={undefined}
>
<textarea
className="Textarea__StyledTextArea-iLqCZR kfzwzn"
className="Textarea__StyledTextArea-iLqCZR ggVGGf"
disabled={undefined}
maxLength={undefined}
name={undefined}
Expand Down Expand Up @@ -1923,7 +1923,7 @@ exports[`Storyshots Textarea With label 1`] = `
</span>
</span>
<textarea
className="Textarea__StyledTextArea-iLqCZR kfzwzn"
className="Textarea__StyledTextArea-iLqCZR ggVGGf"
disabled={undefined}
maxLength={undefined}
name={undefined}
Expand Down
7 changes: 6 additions & 1 deletion src/Textarea/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const StyledTextArea = styled(({ theme, size, error, help, ...props }) => <texta
width: 100%;
padding: ${getTokens(TOKENS.paddingInput)};
border-radius: ${({ theme }) => theme.orbit.borderRadiusNormal};
border: 0;
box-shadow: inset 0 0 0
${({ theme, error }) =>
`${theme.orbit.borderWidthInput} ${
Expand All @@ -60,6 +59,12 @@ const StyledTextArea = styled(({ theme, size, error, help, ...props }) => <texta
resize: ${({ resize }) => resize};
transition: box-shadow ${({ theme }) => theme.orbit.durationFast} ease-in-out;
// IE 11 bug fix, border: 0 won't work - the box-shadow will be hidden
border: 1px solid transparent;
// IE 11 bug fix, hide scrollbar by default (shown only when scrollable)
overflow: auto;
&::placeholder {
color: ${({ theme }) => theme.orbit.colorPlaceholderInput};
}
Expand Down

0 comments on commit bd022a3

Please sign in to comment.