Last active
April 2, 2021 17:39
-
-
Save teddywing/7c543e8cd141a55e40a9a724ba436081 to your computer and use it in GitHub Desktop.
Fix pkg.go.dev CSS styles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2021 Teddy Wing | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | |
You should have received a copy of the GNU General Public License | |
along with this program. If not, see <https://www.gnu.org/licenses/>. | |
*/ | |
/* Page */ | |
/* Make background grey */ | |
body { background-color: #f7f7f7 !important; } | |
/* Header */ | |
/* Hide Black Lives Matter banner */ | |
.Site-header .Banner { display: none !important; } | |
/* Make header grey */ | |
.Site-header { background: #777 !important; } | |
/* Make active navigation link white */ | |
.Header-menuItem--active a:link, | |
.Header-menuItem--active a:visited { | |
border-bottom-color: #dbdbdb !important; | |
} | |
/* Reduce header height */ | |
.Site-header .Header-nav { height: 40px !important; } | |
/* Nix sticky header */ | |
.UnitHeader-outer { display: none !important; } | |
/* Adjust vertical spacing of package header */ | |
.UnitHeader { | |
padding-top: 0 !important; | |
padding-bottom: 0 !important; | |
} | |
.UnitHeader-heading { | |
height: 40px !important; | |
margin-bottom: 9px !important; | |
} | |
.UnitHeader-detail { margin-bottom: 0 !important; } | |
/* Fade out badges */ | |
.UnitHeader-badge { opacity: 0.5 !important; } | |
/* Fade out metadata */ | |
.UnitHeader-detail { opacity: 0.6 !important; } | |
/* Greyscale metadata */ | |
.UnitHeader-detail { | |
filter: grayscale(1) !important; | |
} | |
.UnitHeader-versionBadge--latest, | |
.DetailsHeader-badge--latest { | |
background: transparent !important; | |
border: 1px solid #bbb !important; | |
color: var(--gray-4) !important; | |
} | |
/* Body */ | |
/* Fix margin above body section */ | |
.UnitDetails, | |
.Documentation-overview, | |
.Documentation-overviewHeader { | |
margin-top: 0 !important; | |
} | |
/* Resize columns */ | |
.UnitDetails { | |
grid-template-columns: 14rem minmax(30.5rem, 43.125rem) minmax(10rem, 15.5rem) !important; | |
column-gap: 1rem !important; | |
} | |
/* Remove README section */ | |
.UnitReadme { display: none !important; } | |
/* Hide "Documentation" header */ | |
.UnitDoc-title { display: none !important; } | |
/* Reduce header margins */ | |
.UnitDoc .Documentation h4 { margin-top: 22px !important; } | |
.UnitDetails-content section { margin-top: 1.2rem !important } | |
/* Reduce font size of body */ | |
.Documentation h2, | |
.Documentation h3 { | |
font-size: 1.4rem !important; | |
} | |
.UnitDetails-content div, | |
.UnitDetails-content p, | |
.UnitDetails-content section li { | |
font-size: 0.93rem !important; | |
line-height: 1.4rem !important; | |
} | |
.UnitDetails-content pre { | |
font-size: 0.82rem !important; | |
} | |
/* Collapse "View Source" into the code block section */ | |
.Documentation-declarationLink { | |
background-color: transparent !important; | |
margin-bottom: -21px !important; | |
} | |
/* Give code blocks a darker background than the body */ | |
.UnitDetails-content pre { background-color: #eee !important; } | |
/* Tag List */ | |
/* Always show the Documentation tag list */ | |
#readme-outline { display: none !important; } | |
#doc-outline { display: block !important; } | |
/* Reduce font size of tag list */ | |
.UnitOutline [role="treeitem"][aria-level="1"] { | |
font-size: 0.9rem !important; | |
} | |
.UnitOutline [aria-label="Outline"] { | |
font-size: 14px !important; | |
} | |
.UnitOutline a { line-height: 1.3rem !important; } | |
/* Package Metadata */ | |
/* Fade out package metadata */ | |
.UnitDetails-meta { opacity: 0.4 !important; } | |
/* Adjust vertical margins */ | |
.UnitMetaDetails ul { margin-top: 0 !important; } | |
.UnitMeta-header { margin-bottom: 6px !important } | |
/* Reduce font size of package metadata section */ | |
.UnitMetaDetails-header, | |
.UnitMetaDetails a, | |
.UnitMetaDetails li, | |
.UnitMeta-header, | |
.UnitMeta a { | |
font-size: 12px !important; | |
} | |
/* Greyscale check marks */ | |
.UnitMetaDetails-icon { filter: grayscale(1) !important; } | |
.UnitMetaDetails-toggletip .UnitMetaDetails-icon { | |
filter: contrast(0) !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment