Skip to content

Commit

Permalink
fix: Add consistent color for placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
im3dabasia committed Jan 21, 2025
1 parent be5ce8a commit e9cb9b9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,16 @@ export const Input = styled.input< InputProps >`
&::-webkit-input-placeholder {
line-height: normal;
color: ${ COLORS.ui.darkGrayPlaceholder };
}
&::-moz-placeholder {
opacity: 1; // Necessary because Firefox reduces this from 1.
color: ${ COLORS.ui.darkGrayPlaceholder };
}
&:-ms-input-placeholder {
color: ${ COLORS.ui.darkGrayPlaceholder };
}
&[type='email'],
Expand Down
14 changes: 14 additions & 0 deletions packages/components/src/text-control/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,18 @@
padding-left: $grid-unit-15;
padding-right: $grid-unit-15;
}

// Use opacity to work in various editor styles.
&::-webkit-input-placeholder {
color: $dark-gray-placeholder;
}

&::-moz-placeholder {
opacity: 1; // Necessary because Firefox reduces this from 1.
color: $dark-gray-placeholder;
}

&:-ms-input-placeholder {
color: $dark-gray-placeholder;
}
}

0 comments on commit e9cb9b9

Please sign in to comment.