-
Notifications
You must be signed in to change notification settings - Fork 416
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: notification component #553
base: main
Are you sure you want to change the base?
Conversation
|
transition: opacity var(--pico-transition); ...which seemed correct to me, but looking at the modal implementation, I guess it should not be set, and instead it should be: https://github.com/picocss/pico/blob/main/scss/components/_modal.scss#L132 |
@kyr0 you had my idea of writing a spec-compliant notification component for picocss. You're headed in an interesting direction, similar to https://github.com/Ghosh/micromodal Also good to consider:
|
@myisaak As far as I know, the Notification spec is about presenting an overlay over the browser using system notification APIs. I've implemented it a few times. This spec AFAIK hasn't anything to do with Notifications rendered inside of the browser's/tab's website viewport. The behaviour, wether it is replacing or stacking in nature is set by the browser by default and can often be overridden in systems settings (verified in macOS). I agree with the obstructive nature of modals blocking the UI. I just didn't find a way to have the I think that I didn't go in the direction of https://github.com/Ghosh/micromodal though. They are constructing obstructive modals using elements not meant for the purpose ( |
Hi @lucaslarroche
as discussed here: #552 I've built a Notification component for Pico.
Feel free to integrate it, if you think it's useful. It definitely helps the UX of my Pico-based frontend, and as it is fully spec-compliant and accessible, I think it's a nice addition.
Please let me know if you want me to change anything in the implementation.
Demo
Thank you for building Pico!
Best,
Aron
Relevant code quicklinks:
Impl:
pico/scss/components/_notification.scss
Line 4 in c1b55d8
Settings:
pico/scss/_settings.scss
Line 142 in c1b55d8
Import:
pico/scss/_index.scss
Line 46 in c1b55d8