Support <dialog>, at least at the level of recognizing in CSS
Hi y’all, I realize that supporting some elements, like <dialog>, is out of scope for Dillo. However, it would be nice to recognize these elements, at least in stylesheets, so that I can at least do dialog { display: none; } Right now, the dialog is just displayed unconditionally, because, it seems, such a style rule does not apply to it. Check https://aartaka.me for an example of such dialog not hiding. So, is this it fixable? Thanks, -- Artyom Bologov https://aartaka.me
Hi,
So, is this it fixable?
You can add a container with display:none, like this: <!doctype html> <html> <head> <title>Hidden dialog</title> <style> .hidden { display: none; } </style> </head> <body> <div class=hidden> <dialog>This won't be displayed.</dialog> </div> </body> </html> Notice that you shouldn't not rely on content not being displayed, many people browse with no styles enabled. Best, Rodrigo.
Hi Rodrigo,
So, is this it fixable?
You can add a container with display:none, like this:
<!doctype html> <html> <head> <title>Hidden dialog</title> <style> .hidden { display: none; } </style> </head> <body> <div class=hidden> <dialog>This won't be displayed.</dialog> </div> </body> </html>
I can, but that kinda defeats the purpose of using a dedicated semantic element in the first place. As another argument in favor of adding <dialog>: <section> is added too, so why not have <dialog> if it’s literally a zero maintenance choice with noJS focus of Dillo?
Notice that you shouldn't not rely on content not being displayed, many people browse with no styles enabled.
Yes, I don’t expect the reader to have CSS on, but enabling / using it enhances the reading experience. In case of my <dialog>, it makes the site more accessible to mobile users (majority of them really, with the exception of bots,) so I’m ready for this trade-off. In any way, here’s a patch supporting <dialog>, if you’d like to support that: Hopefully, I didn’t mess it up. Best of luck, -- Artyom Bologov https://aartaka.me
participants (2)
-
Artyom Bologov -
Rodrigo Arias