Skip to content

TextField & SearchBox: Specified placeholder colors#3762

Merged
lynamemi merged 8 commits into
microsoft:masterfrom
lynamemi:placeholder-colors
Jan 23, 2018
Merged

TextField & SearchBox: Specified placeholder colors#3762
lynamemi merged 8 commits into
microsoft:masterfrom
lynamemi:placeholder-colors

Conversation

@lynamemi

Copy link
Copy Markdown
Collaborator

Pull request checklist

Description of changes

Allows us to be consistent across browsers

Focus areas to test

(optional)

@betrue-final-final betrue-final-final left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good here.

export function getStyles(props: ISearchBoxStyleProps): ISearchBoxStyles {
const { theme, underlined, disabled, hasFocus, className, hasInput } = props;
const { palette, fonts } = theme;
const { palette, fonts, semanticColors } = theme;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't you get a compiler warning for adding semanticColors here but not use it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true! I just added the slot for inputPlaceholderText.

display: 'none'
},
'::placeholder': {
color: palette.neutralSecondary,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add an inputPlaceholderText slot

':-ms-input-placeholder': {
color: palette.neutralSecondary
},
'::-ms-input-placeholder': {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are both syntaxes necessary?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently browser versioning and placeholder selectors get hairy, but it looks like using just the two will work on at at least all my browser versions.

@micahgodbolt micahgodbolt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the duplicate syntax :ms and ::ms looks good to me

@lynamemi lynamemi merged commit b311324 into microsoft:master Jan 23, 2018
@lynamemi lynamemi deleted the placeholder-colors branch January 23, 2018 17:27
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Search Box] The search box text appears dark black on IE 11 as compared to other browsers like chrome

4 participants