-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat(focus): add atomic focus classes #1637
Conversation
✅ Deploy Preview for stacks ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
How do I test this @dancormier ? |
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.
@dancormier The PR looks good to me. Great work!
I would recommend to take the occassion to add a less snapshot test for the misc file similarly to what we do for colors here.
I was also wondering if we already know that we will have use cases for all the 4 classes in Core. Creating larger API areas = More maintenance efforts. Anyway I am also happy to expose all 4 (actually 8 with the conditional one) at once.
I think these classes will be useful for custom built components within consumer libraries, but I'm not too sure of a concrete example. At first, I was assuming it it would be used for the post summaries that show up as search suggestion but I those can probably be handled with removing Eventually, I expect Stacks to handle |
Sorry, I should have mentioned how this can be tested @CGuindon. You can see these atomic classes in action in the docs at https://deploy-preview-1637--stacks.netlify.app/product/base/interactivity/#focus |
I am a fan of adding things only when we have a real world use case for it. Predicting future needs is difficult so I will hold off from merging those classes until somebody in Core will present us with a use case (or we find one ourselves). 🙂 |
Update: I found a use case for these atomic classes! Currently, the editor programmatically applies |
I am happy to merge this in if we have a use case now for them. I only had a minor comment around import statements in the less file. Thanks @dancormier 🙂 |
This PR adds atomic focus style classes to the library. I think this is necessary in order to allow consumers to style elements that otherwise wouldn't receive the desired focus style.
https://deploy-preview-1637--stacks.netlify.app/product/base/interactivity/#focus