-
Notifications
You must be signed in to change notification settings - Fork 16
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
native-like styles for interactive features #478
Conversation
I've pushed 769e145 to use the This makes features more link- or button-like in terms of highlighting, and the color may vary depending on the OS. It'd be nice if we could ensure that these "highlight strokes" always have sufficient contrast, but I'm not sure there's a proper way to do that in CSS. |
I think this works. As you say, we'll need to support prefs, somehow. |
I'll merge 'soon', but the PE demo will break if I merge now. |
Pushed bd668e8 to use the |
This is good work. I'm pretty sure I pushed Ahmad to include the thick black highly visible stroke on focus (maybe not the animation, though). I do like the addition to hover. Fully agree we don't need both the stroke and the outline; the stroke alone is good information, although sometimes you might miss a teeny outlier piece of the geometry without the outline. I also appreciate that each |
stroke
to interactive features on:hover
(in conjunction to:focus
). This enables users to see the entire hit area of the interactive feature that is being hovered.stroke-width: 5
(currently applied on:focus
) such that the highlighting inherits (and does not override) the initial stroke-width of a feature.outline
on:focus
as imposed by our outline reset becausestroke
takes care of the highlighting of interactive features, no need to also have an additional outline.stroke
animations. In the spirit of the W3C TAG guidelines for custom components we should keep styles to a bare minimum. If authors want animations they should implement it themselves (even though I'm aware author-provided CSS is not yet supported).Comparison
Interaction steps as displayed in the videos below:
Before
feature-styles-before.mp4
After
feature-styles-after.mp4
Thoughts? Personally, I'm not sure about:
I think it's a nice addition and makes it clear where the clickable area of an interactive feature is, but it may also feel "chatty". Either way, the highlighting of features may be subject to user-preferences: #297.