Skip to content

Conversation

@ianmcook
Copy link
Member

@ianmcook ianmcook commented Sep 22, 2025

This fixes some glitches caused by #69 that I didn't see until I test-drove the docs more.

@ianmcook ianmcook requested a review from amoeba September 22, 2025 20:56
Copy link
Member

@amoeba amoeba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link target is off,

Image

Image

I can work on fixing this.

@amoeba
Copy link
Member

amoeba commented Sep 22, 2025

I think it's just something weird about Safari. I do think we can simplify this quite a lot and address the layout issue but I'm going to merge this as-is.

diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css
index 8b8f524..79dc599 100644
--- a/docs/stylesheets/extra.css
+++ b/docs/stylesheets/extra.css
@@ -2,34 +2,38 @@
   --md-default-bg-color: rgb(33, 33, 33);
   --md-code-bg-color: rgb(45, 45, 45);
 }
+
 /* Hide the site name in the header... */
 .md-header__title .md-header__topic:first-of-type {
   display: none !important;
 }
+
 /* ...and show the dbc logo instead when it's not already shown */
 @media screen and (max-width: 76.1875em) {
   .md-nav--primary .md-nav__title[for="__drawer"] {
     color: transparent !important;
-    a img {
-      position: absolute;
-      top: 1.5em;
+
+    .md-nav__title[for="__drawer"] {
+      padding: 0 !important;
     }
   }
-  .md-header__title .md-header__ellipsis {
-    position: relative;
-    padding-left: 82px;
+
+  /* This makes the logo not too huge */
+  .md-nav__title .md-nav__button.md-logo img {
+    width: 50%;
   }
-  .md-header__title .md-header__ellipsis::before {
-    content: "";
-    position:absolute;
-    left: 0;
-    top: 50%;
-    transform: translateY(-50%);
-    width: 61px;
-    height: 26px;
-    background: url("../assets/dbc_logo_white_static.svg") no-repeat center;
-    background-size: contain;
-    background-repeat: no-repeat;
-    vertical-align: middle;
+
+  /* Margins aren't really called for in layout like this, this improves
+  the layout a lot */
+  .md-nav--primary .md-nav__title .md-logo {
+    margin: 0 !important;
+  }
+
+  .md-nav__title[for="__drawer"] {
+    /* hide default "dbc" text */
+    font-size: 0 !important;
+    /* Removes the unnecessary padding below the logo, I'm not sure why
+    mkdocs sets height to be so large. */
+    height: 3.4rem !important;
   }
 }

@amoeba amoeba self-requested a review September 22, 2025 22:40
@amoeba amoeba merged commit cf38aa6 into columnar-tech:main Sep 22, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants