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

Fix regression with Button placeholder text #10160

Merged
merged 1 commit into from
Sep 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/block-library/src/button/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@
cursor: text;
line-height: 1;
}

&:not(.has-text-color) .editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce {
Copy link
Member

Choose a reason for hiding this comment

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

That’s quite the selector! 😅

Any chance there’s anything less intense we can use? No worries if not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, sadly — the way we create placeholder text in fields like these is rather exotic, so it has to use the plus selector. We also want to make sure that the actual text color is only applied when a user specified one isn't, in that case we want to rely on opacity for the user customized placeholder text color :)

color: $white;
opacity: 0.8;
}
}

.block-library-button__inline-link {
background: #fff;
background: $white;
display: flex;
flex-wrap: wrap;
align-items: center;
Expand Down