mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Use modernizr & CSS for user menu without JS
Modernizr adds a class called 'js' to the <html> element when javascript is available. We, as a part of basic modernizr setup, add a class called 'no-js' to <html> element by default. Use this fact to show/hide elements when javascript is not available.
This commit is contained in:
1 parent
22a020e63b
commit
9752ab8188
2 files changed
+11
-7
No files matched your search
@@ -32,3 +32,13 @@ body {
|
||||
.running-status.inactive {
|
||||
background-color: rgb(228, 66, 66);
|
||||
}
|
||||
|
||||
/* Hide log out button if user dropdown is available */
|
||||
.js #logout-nojs {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide the dropdown icon when javascript is not available */
|
||||
.no-js .nav .dropdown .caret {
|
||||
display: none;
|
||||
}
|
||||
Reference in new issue
Block a user