dialog-polyfill
devadvance
dialog-polyfill | devadvance | |
---|---|---|
8 | 2 | |
2,432 | 0 | |
0.2% | - | |
0.0 | 1.8 | |
3 months ago | over 2 years ago | |
JavaScript | ||
BSD 3-clause "New" or "Revised" License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dialog-polyfill
-
The <Dialog> Element
> - Z-index has no effect in the top-layer. No need to compete for a higher z-index.
This is the kind of boring feature that can end up saving huge amounts of developer time. Z-indexing in CSS is kind of annoying and I've seen projects just detach dialogs from their normal position in the DOM entirely to get around stacking errors before.
----
Minor question:
> - There is only one `top-layer` but it can have many children. Last opened === current element on top.
Is this true? The spec says:
> The top layer is an ordered set of elements, rendered in the order they appear in the set. The last element in the set is rendered last, and thus appears on top.
I'm still playing around with `dialog` elements, so you may well be right, I'm just having trouble finding the actual spec rules about what happens when there are multiple dialogs and they're being simultaneously manipulated.
----
> - Not supported in Safari <= 15.3
Worth noting that there is a polyfill (https://github.com/GoogleChrome/dialog-polyfill), but that the polyfill comes with some fairly large limitations, specifically that they don't advise dialogs be used as children of elements with their own stacking context.
This is reasonable, but also... my first thought when I originally ran into `dialog` was "finally I can stop worrying about which of my elements create new stacking contexts!" -- so it does decrease the usefulness quite a bit.
- La espera terminó: el elemento <dialog> alcanza pleno soporte
-
Is learning Vue instead of React a mistake?
Yeah, Safari is pretty often behind the other popular browsers. But, you can generally predict that by looking for any given feature on MDN and check the "Browser compatibility" section. Sometimes, there are polyfills available that sort of "force" a feature to work across every browser.
-
Can we use <dialog> yet?
(Searching for "polyfill " will usually get you good results - in this case the first result appears to be a library maintained by the Chrome team: https://github.com/GoogleChrome/dialog-polyfill )
-
New WebKit Features in Safari 15.4
This does not make sense. Of course new functionality won't work on old browsers. is easy to polyfill well: https://github.com/GoogleChrome/dialog-polyfill
-
Just a single tag can create this dialog box. <dialog> tag with open attribute created this simple styled centered box. => <dialog open>This is a dialog box</dialog>
GoogleChrome / dialog-polyfill
- Using for Menus and Dialogs Is an Interesting Idea
devadvance
-
Quirks of the Page Visibility API
Hi there, thanks for the feedback! I overlooked testing with scrollbars set to always show, as Firefox recently started following macOS/Windows system settings rather than using its own setting. I've updated the CSS to use `100%` to rectify this. For this specific post, a bare link was also causing additional horizontal scroll, so I addressed both in https://github.com/devadvance/devadvance.github.io/commit/6a....
-
Using for Menus and Dialogs Is an Interesting Idea
I saw several posts about using `` in this way, but none that fully implemented what I was looking for. So I implemented a site navbar that uses `` in two ways: for dropdowns, and for a sidebar.
A working reference implementation can be found here [1]. Additionally, I ended up using a version of this on my personal site [2].
One thing to be careful of when using `
` in interesting ways: accessibility. At a minimum, I encourage folks to make sure that screen readers work as expected.[1] https://codepen.io/devadvance/pen/bGBvvWv
[2] https://github.com/devadvance/devadvance.github.io/blob/mast...
What are some alternatives?
a11y-dialog - A very lightweight and flexible accessible modal dialog script.
sciter - Sciter: the Embeddable HTML/CSS/JS engine for modern UI development
kill-sticky - Bookmarklet to remove sticky elements and restore scrolling to web pages!
autoprefixer - Parse CSS and add vendor prefixes to rules by Can I Use
webmidi-test - 🎵 Web MIDI Test page with basic device hotplug support
caniuse - Raw browser/feature support data from caniuse.com
WHATWG HTML Standard - HTML Standard