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

Cover Block: Add Hover Reveal style #20402

Open
alaczek opened this issue Feb 24, 2020 · 7 comments
Open

Cover Block: Add Hover Reveal style #20402

alaczek opened this issue Feb 24, 2020 · 7 comments
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.

Comments

@alaczek
Copy link

alaczek commented Feb 24, 2020

Is your feature request related to a problem? Please describe.
Hovering over an image to reveal text/link is a popular web design pattern. It would be great if the Cover block enabled that by adding dedicated block style.

epo251NU6k

The screenshot comes from Dalston theme ( source ) where "Hover reveal" is added as a custom style to the Cover block.

Here's how it looks like in the editor:

image

The behaviour is the same in the editor and on the frontend -- with "Hover reveal" style applied, the text shows up when hovering over an image. Clicking on the text makes it editable. Not sure if that particular behaviour in the editor would cause accessibility issues or not, but I'm sure we can iron out that part, if we agree that having this style added would be useful.

Si2wN8bajX

@mtias mtias added [Block] Cover Affects the Cover Block - used to display content laid over a background image [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. labels Feb 24, 2020
@jasmussen
Copy link
Contributor

Nice ticket! This seems like a fine enhancement to add to the Cover block in my opinion. I'm assuming that focus also reveals?

@alaczek
Copy link
Author

alaczek commented Feb 25, 2020

I'm assuming that focus also reveals?

Do you mean when focusing with a keyboard? It does not in Dalston, although it definitely should.

@truchot
Copy link
Contributor

truchot commented Feb 25, 2020

I think it's possible to do this animation with the block cover and a bit of CSS, no?

@jasmussen
Copy link
Contributor

Do you mean when focusing with a keyboard? It does not in Dalston, although it definitely should.

Yep, I was thinking that if you tab into the block, the content should be revealed. Or even if you click on the hoverable area, that sets a lingering focus there, this should keep the content visible even as you mouse out and only disappear when you click somewhere else.

To phrase it even simpler, instead of :hover { ... }, I'm suggesting :hover, :focus { ... } ;) — though we might have to throw in some :focus-within 😱

I think it's possible to do this animation with the block cover and a bit of CSS, no?

Absolutely. I read this ticket as posing the question: does this have so much value that it should be a toggle in the block, as opposed to require custom CSS?

@karmatosed
Copy link
Member

I love this idea as feels like a great addition to the cover image block. Let's get this a 'needs dev' label and move into that.

@karmatosed karmatosed added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Feb 25, 2020
@mtias mtias added the [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi label Mar 12, 2020
@krzakx
Copy link

krzakx commented Jan 23, 2024

Hey, do we have any update on that?

@Draino
Copy link

Draino commented Jan 25, 2024

Has this been implemented yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants