all repos — searchix @ 29f2099e68a3226060308c66e5b1aa19fb2ba8e0

Search engine for NixOS, nix-darwin, home-manager and NUR users

fix(css): support browsers without css nesting
Alan Pearce alan@alanpearce.eu
Fri, 17 May 2024 13:53:34 +0200
commit

29f2099e68a3226060308c66e5b1aa19fb2ba8e0

parent

054d2b3bf7eb4c5a5401565e86031f22ea754062

1 files changed, 31 insertions(+), 35 deletions(-)

jump to
M frontend/static/style.cssfrontend/static/style.css
@@ -21,30 +21,28 @@ align-items: center;   display: flex;
   justify-content: center;
   padding: unset;
-  & > :only-child {
-    margin-block-start: 0;
-  }
-  & > nav {
-    width: min(var(--min-width), 90%);
-    display: flex;
-    padding: 0.5rem 0;
-
-    a {
-      margin-bottom: unset;
-      font-size: 1.15rem;
-    }
-
-    & h1 {
-      margin: unset;
-      font-size: 1.15rem;
-      line-height: 2;
-      & > a {
-        margin-left: unset;
-        padding-left: unset;
-        border: 1px transparent;
-      }
-    }
-  }
+}
+body > header > :only-child {
+  margin-block-start: 1ex;
+}
+header > nav {
+  width: min(var(--min-width), 90%);
+  display: flex;
+  padding: 0.5rem 0;
+}
+header > nav a {
+  margin-bottom: 1ex;
+  font-size: 1.15rem;
+}
+nav > h1 > a {
+  margin-left: unset;
+  padding-left: unset;
+  border: 1px transparent;
+}
+body > header h1 {
+  margin: unset;
+  font-size: 1.15rem;
+  line-height: 2;
 }
 
 form {
@@ -98,18 +96,16 @@ pre:has(> code) {   background: var(--bg);
 }
 
-section {
-  nav {
-    display: flex;
-    justify-content: space-between;
-    align-items: baseline;
-    a[rel="next"] {
-      margin-left: auto;
-    }
-  }
-  footer {
-    text-align: center;
+section > nav {
+  display: flex;
+  justify-content: space-between;
+  align-items: baseline;
+  a[rel="next"] {
+    margin-left: auto;
   }
+}
+section > footer {
+  text-align: center;
 }
 
 .error {