Does :hover work in 3.1.1? I am trying to write a JavaScript-less dropdown to switch locale as e.g. outlined here: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_responsive_navb... Short story: the dropdown is an ul with "display: none" and hovering over a parent element (that is displayed) is supposed to switch to "display: block". But nothing happens when I hover over the parent. Google found me this, dated August 19 2022, listing pseudo-classes as Pending, but August 19 2022 is almost two years ago...? https://dillo.org/css.html (looks like that "Pending" may be from January 1 2015...?) If :hover doesn't work I will have to do it a different way: maybe with a separate settings page containing a form...? Here is the HTML of the dropdown: <li> <div class="locale-dropdown"> <a href="">Language</a> <ul class="locale-dropdown-content"> <li><a href="">English</a></li> <li><a href="">norsk bokmål</a></li> </ul> </div> </li> (the dropdown is nested in a <li> that is part of the <ul> that forms the <nav>) The CSS looks like this: .locale-dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1; } .locale-dropdown:hover .locale-dropdown-content { display: block; }
Hi, On Fri, Jul 26, 2024 at 07:09:05PM +0200, Steinar Bang wrote:
Does :hover work in 3.1.1?
No, its not implemented, only ":link" and ":visited": https://github.com/dillo-browser/dillo/blob/v3.1.1/src/cssparser.cc#L1426-L1...
I am trying to write a JavaScript-less dropdown to switch locale as e.g. outlined here: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_responsive_navb...
Short story: the dropdown is an ul with "display: none" and hovering over a parent element (that is displayed) is supposed to switch to "display: block".
But nothing happens when I hover over the parent.
Google found me this, dated August 19 2022, listing pseudo-classes as Pending, but August 19 2022 is almost two years ago...? https://dillo.org/css.html (looks like that "Pending" may be from January 1 2015...?)
You may want to check: https://dillo-browser.github.io/dillo.org.html And: https://dillo-browser.github.io/release/3.1.0/
If :hover doesn't work I will have to do it a different way: maybe with a separate settings page containing a form...?
I recommend you just don't use a drop down, just an static navigation menu which would work fine with CSS disabled. You could also use a <select> input with a form but it looks more complicated.
Here is the HTML of the dropdown: <li> <div class="locale-dropdown"> <a href="">Language</a> <ul class="locale-dropdown-content"> <li><a href="">English</a></li> <li><a href="">norsk bokmål</a></li> </ul> </div> </li>
(the dropdown is nested in a <li> that is part of the <ul> that forms the <nav>)
The CSS looks like this:
.locale-dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1; }
.locale-dropdown:hover .locale-dropdown-content { display: block; }
_______________________________________________ Dillo-dev mailing list -- dillo-dev@mailman3.com To unsubscribe send an email to dillo-dev-leave@mailman3.com
Rodrigo Arias <rodarima@gmail.com>:
You may want to check:
And:
Right! I knew that actually, from the mastodon post that brought dillo back into my attention. But when looking for stuff I am lazy and I google rather than remembering, and google still throw up the old pages. I'll link to the updated dillo doc from the oldalbum README when I release the non-javascript version. That should help the teensiest bit, at least (also it's a place I can click to to get there).
If :hover doesn't work I will have to do it a different way: maybe with a separate settings page containing a form...?
I recommend you just don't use a drop down, just an static navigation menu which would work fine with CSS disabled.
Yup, the simplest way would be to have just two links in the <nav> one for each locale/language. But that would be too much clutter, I think...?
You could also use a <select> input with a form but it looks more complicated.
Yes, it is. But it's the road I've started to travel. :-) (remains to see if I will travel it to the end or cut my losses and do something simpler...:-) ) I have some copy-pastable code. I did the authservice login and basic self-service pages non-javascript (authservice started as a forms based login plugin for nginx, using apache shiro), and I have stuff I can copy paste from there: https://github.com/steinarb/authservice I don't like JSP or JSF (feels complicated and cluttered) so I did a simple DIY templating with jersey and jsoup (I write HTML pages and read them into jersey resources with jsoup and replace elment content and fill forms). I was looking for sort of the same feel I had when using CGI.pm back in the day: the state is contained in the form data and used to populate the form in the returned HTML, and jsoup gave me that. The use of jersey is because JAX-RS gives a convenient API to tailor responses (HTTP headers and stuff).
participants (2)
-
Rodrigo Arias
-
Steinar Bang