-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Polish placeholder radius and enable duotone on image setup state #43425
Conversation
Size Change: +19 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat. It's working for me :)
fi.mp4
Testing using the Gutenberg PR build. In the Placeholder state I clicked the duotone filter. Wondered why it did not show up. Read the instructions closer and noticed it said in the unselected state. Thought the effect was pretty cool, and viewed it on the frontend. There I could not see the duotone filter applied. The thing is adding something to a placeholder state one might just like the effect and want to keep it that way even though it is not meant to be that way. Anyhow it is pretty nice to have this feature added even though it is pretty much a hidden feature. |
What?
This PR does two things. First off, it provides a default border radius for the dashed-style placeholder that matches that of every other placeholder, 2px. But any custom radius/border set still shows:
Props to @aaronrobertshaw for foundational work!
It also enables Duotone to be visible in the setup state:
The strength of this duotone filter showing in the dashed/blurred style is something we can tweak to get the balance just right. Take it for a spin and let me know your thoughts.
Why?
It is useful for patterns to include blocks in their empty/setup states. In these placeholder states, the more of their surroundings these blocks can inherit, the better the preview of the end result.
Testing Instructions
Please test inserting an empty image block, then applying a duotone filter. It should be visible in the unselected state only.