Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML: make sure the default opacity of ::placeholder is 1 #25310

Merged
merged 1 commit into from Sep 17, 2020

Conversation

karlcow
Copy link
Contributor

@karlcow karlcow commented Sep 1, 2020

This test relates to the opacity difference in between Gecko, Blink and WebKit as mentioned by @fvsch

/* Gecko style */
::placeholder {
  color: inherit;
  opacity: 0.54;
}

/* WebKit style */
::placeholder {
  color: #9a9a9a;
  opacity: 1;
}

/* Blink style */
::placeholder {
  color: #757575;
  opacity: 1;
}

See whatwg/html#2561 (comment)
and https://codepen.io/webcompat/pen/bWEEJv

@domenic
Copy link
Member

domenic commented Sep 1, 2020

I think it'd be better to test this using CSSOM?

Regardless, we can't merge this as-is since it's not covered by any spec. But we could rename it to -tentative, and add a link to the spec discussion.

@karlcow
Copy link
Contributor Author

karlcow commented Sep 1, 2020

@domenic happy to do the modifications, do you have an example of something similar done with CSSOM? Thanks

@domenic
Copy link
Member

domenic commented Sep 2, 2020

Basically test getComputedStyle(el, "::placeholder").opacity.

@karlcow
Copy link
Contributor Author

karlcow commented Sep 10, 2020

ok locally this is working.

Capture d’écran 2020-09-10 à 15 12 11

@karlcow
Copy link
Contributor Author

karlcow commented Sep 10, 2020

@domenic is it closer from what you wanted?

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Looks great! Sorry for the delay; I was OOO last week.

Last change: use .tentative instead of -tentative, per http://web-platform-tests.org/writing-tests/file-names.html?highlight=tentative.

@karlcow
Copy link
Contributor Author

karlcow commented Sep 17, 2020

@domenic thanks. ok done.

@domenic domenic merged commit a5d0e1a into web-platform-tests:master Sep 17, 2020
@karlcow karlcow deleted the placeholder-opacity branch January 17, 2021 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants