/* ==UserStyle==
@name go.dev Catppuccin
@namespace github.com/catppuccin/userstyles/styles/go.dev
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/go.dev
@version 2024.12.31
@updateURL https://github.com/keonly/userstyles/raw/main/styles/go.dev/catppuccin.user.less
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Ago.dev
@description Soothing pastel theme for go.dev
@author Catppuccin
@license MIT
@preprocessor less
@var select lightFlavor "Light Flavor" ["latte:Latte", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha*"]
@var select darkFlavor "Dark Flavor" ["latte:Latte", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha*"]
@var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray*"]
==/UserStyle== */
@-moz-document domain("go.dev") {
:root[data-theme="auto"],
:root:not([data-theme]) {
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor);
}
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor);
}
}
:root[data-theme="dark"] {
#catppuccin(@darkFlavor);
}
:root[data-theme="light"] {
#catppuccin(@lightFlavor);
}
#catppuccin(@flavor) {
@rosewater: @catppuccin[@@flavor][@rosewater];
@flamingo: @catppuccin[@@flavor][@flamingo];
@pink: @catppuccin[@@flavor][@pink];
@mauve: @catppuccin[@@flavor][@mauve];
@red: @catppuccin[@@flavor][@red];
@maroon: @catppuccin[@@flavor][@maroon];
@peach: @catppuccin[@@flavor][@peach];
@yellow: @catppuccin[@@flavor][@yellow];
@green: @catppuccin[@@flavor][@green];
@teal: @catppuccin[@@flavor][@teal];
@sky: @catppuccin[@@flavor][@sky];
@sapphire: @catppuccin[@@flavor][@sapphire];
@blue: @catppuccin[@@flavor][@blue];
@lavender: @catppuccin[@@flavor][@lavender];
@text: @catppuccin[@@flavor][@text];
@subtext1: @catppuccin[@@flavor][@subtext1];
@subtext0: @catppuccin[@@flavor][@subtext0];
@overlay2: @catppuccin[@@flavor][@overlay2];
@overlay1: @catppuccin[@@flavor][@overlay1];
@overlay0: @catppuccin[@@flavor][@overlay0];
@surface2: @catppuccin[@@flavor][@surface2];
@surface1: @catppuccin[@@flavor][@surface1];
@surface0: @catppuccin[@@flavor][@surface0];
@base: @catppuccin[@@flavor][@base];
@mantle: @catppuccin[@@flavor][@mantle];
@crust: @catppuccin[@@flavor][@crust];
@accent: @catppuccin[@@flavor][@@accentColor];
color-scheme: if(@flavor = latte, light, dark);
::selection {
background-color: fade(@accent, 30%);
}
input,
textarea {
&::placeholder {
color: @subtext0 !important;
}
}
background-color: @base;
--abbey: @mantle;
--black-1: @crust;
--color-border: @surface2;
--color-background: @base;
--color-background-accented: @mantle;
--color-background-banner: @mantle;
--color-background-card-footer: @crust;
--color-background-code: @surface0; // Code Snippets
--color-background-info: @surface1;
--color-background-inverted: @crust;
--color-background-logo: @text;
--color-background-playground-input: @mantle;
--color-brand-primary: @accent; // Affects most Go-Color Elements
--color-button: @accent;
--color-button-accented: @accent;
--color-button-text: @crust;
--color-button-text-disabled: @subtext0;
--color-bright-text-link: @accent;
--color-text: @text;
--color-text-link: @accent;
--color-text-subtle: @subtext1;
--focus-box-shadow: 0 0 0.0625rem 0.0625rem @accent; // Only modifies color;
--gray-2: @surface0;
--gray-3: @text;
--gray-6: @crust;
--pink: @red;
--turq-dark: @accent;
--white: @text;
--border-code: 0.0625rem @surface2 solid;
.btn {
background: @accent;
color: @crust;
}
// /dl page in go.dev
.Downloads {
div.filename img {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
table.downloadtable {
--color-background-accented: @surface0;
}
}
// Main Page Footer & Pkg.go Footer
.Footer,
.go-Footer {
background-color: @mantle;
button[aria-label="Shorcuts Modal"] img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
img.Footer-gopher,
img.go-Footer-gopher {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
img.go-Footer-googleLogoImg,
img.Footer-googleLogoImg {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
}
// Main Page Footer Get Started
.GettingStartedGo-primaryCta {
color: @crust;
}
// Main Page Carousel
.GoCarousel button {
background-color: @text;
color: @crust;
}
// Download button in /learn
.Learn-heroAction {
background-color: @accent;
.js-downloadBtn {
color: @crust;
}
}
// Active indicator in /learn
.LearnNav .active svg circle {
fill: @accent;
}
.LeftNav a.active,
.LeftNav a:hover {
background-color: fade(@accent, 30%);
img {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
}
// /solutions/use-cases & Why Use Go / 4 icons
.MarketingCardList,
.WhyGo-reasons .WhyGo-reasonIcon {
img.LightMode-img[alt="cloud icon"],
img.DarkMode-img[alt="cloud icon"],
img[alt="Sphere"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
img.LightMode-img[alt="CLI icon"],
img.DarkMode-img[alt="CLI icon"],
img[alt="Command Line"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
img.LightMode-img[alt="web dev icon"],
img.DarkMode-img[alt="web dev icon"],
img[alt="Code"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
img.LightMode-img[alt="ops icon"],
img.DarkMode-img[alt="ops icon"],
img[alt="Sphere"][src="/images/icons/gear-dark.svg"],
img[alt="Sphere"][src="/images/icons/gear.svg"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
}
// Mobile Nav Drawer
.NavigationDrawer {
.NavigationDrawer-header {
border-bottom-color: @surface2;
}
// Drawer Selection
.NavigationDrawer-listItem--active {
background-color: fade(@accent, 30%);
}
}
// /play
.PlayPage {
.lines div {
color: @overlay1; // Line numbers
}
}
// Run Button for Code Snippet
.Playground-runButton {
border-color: @accent;
}
// Go Main Header
.Site-header,
.go-Header {
background: @crust;
.Header-menuItem--active a,
.go-Header-menuItem--active a {
border-bottom-color: @accent;
}
// Mobile Burger Icon
button.Header-navOpen--white,
button.go-Header-navOpen--white {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
filter: none;
}
}
// 'What's Possible With Go'
.WhyGo-reasons {
.WhyGo-reasonPackagesHeader img {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
.WhyGo-reasonShowMoreLink a {
color: @crust;
}
img.WhyGo-reasonShowMoreImg {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
}
// /doc/install icon
img.CopyPaste-icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
// Go Main Logo
.Site-header .Header-logo,
.NavigationDrawer-logo,
.go-Header .go-Header-logo,
.go-NavigationDrawer .go-NavigationDrawer-logo,
.top-bar img.gopherlogo,
.go-Main-headerLogo,
.SearchResults-headerLogo img[alt="Go"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
// Theme Selector Icons
.Footer img[alt="Dark theme"],
.go-Footer img[alt="Dark theme"],
.top-bar img.go-Icon--inverted[data-value="dark"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
// Right Arrow Icons
.go-NavigationDrawer-listItem a[href="#"] img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
.SiteBreadcrumb .BreadcrumbNav-li::after {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
}
.Footer img[alt="Light theme"],
.go-Footer img[alt="Light theme"],
.top-bar img.go-Icon--inverted[data-value="light"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
.Footer img[alt="System theme"],
.go-Footer img[alt="System theme"],
.top-bar img.go-Icon--inverted[data-value="auto"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
// Menu Active Selector
img.TabSection-underline {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
// Code Snippet Highlights
pre {
.comment {
color: @overlay2;
}
ins {
color: @blue;
}
}
// Companies in Main Page Contrast
& when (@flavor = latte) {
.WhoUsesCaseStudyList-caseStudyLink {
background-color: @surface0;
}
}
}
}
@-moz-document domain("pkg.go.dev") {
:root[data-theme="auto"],
:root:not([data-theme]) {
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor);
}
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor);
}
}
:root[data-theme="dark"] {
#catppuccin(@darkFlavor);
}
:root[data-theme="light"] {
#catppuccin(@lightFlavor);
}
#catppuccin(@flavor) {
@rosewater: @catppuccin[@@flavor][@rosewater];
@flamingo: @catppuccin[@@flavor][@flamingo];
@pink: @catppuccin[@@flavor][@pink];
@mauve: @catppuccin[@@flavor][@mauve];
@red: @catppuccin[@@flavor][@red];
@maroon: @catppuccin[@@flavor][@maroon];
@peach: @catppuccin[@@flavor][@peach];
@yellow: @catppuccin[@@flavor][@yellow];
@green: @catppuccin[@@flavor][@green];
@teal: @catppuccin[@@flavor][@teal];
@sky: @catppuccin[@@flavor][@sky];
@sapphire: @catppuccin[@@flavor][@sapphire];
@blue: @catppuccin[@@flavor][@blue];
@lavender: @catppuccin[@@flavor][@lavender];
@text: @catppuccin[@@flavor][@text];
@subtext1: @catppuccin[@@flavor][@subtext1];
@subtext0: @catppuccin[@@flavor][@subtext0];
@overlay2: @catppuccin[@@flavor][@overlay2];
@overlay1: @catppuccin[@@flavor][@overlay1];
@overlay0: @catppuccin[@@flavor][@overlay0];
@surface2: @catppuccin[@@flavor][@surface2];
@surface1: @catppuccin[@@flavor][@surface1];
@surface0: @catppuccin[@@flavor][@surface0];
@base: @catppuccin[@@flavor][@base];
@mantle: @catppuccin[@@flavor][@mantle];
@crust: @catppuccin[@@flavor][@crust];
@accent: @catppuccin[@@flavor][@@accentColor];
// Pkg.go Carousel
.go-Carousel {
.go-Carousel-nextSlide img {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
.go-Carousel-prevSlide img {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
}
// Alert Chips
.go-Chip--alert {
color: @crust;
}
// Pkg.go Clipboard Icon
.go-Clipboard img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
// Pkg.go Header
.go-Header {
.go-Header-submenu {
border-color: @accent;
}
// Triangle Icon Accented
.go-Header-menuItem:hover img.go-Icon[alt="submenu dropdown icon"],
.go-Header-menuItem:focus-within
img.go-Icon[alt="submenu dropdown icon"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
}
// Triangle Icon
.go-Header,
.go-Main-navMobile {
@svg: escape(
''
);
img.go-Icon[alt="submenu dropdown icon"] {
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
.go-Select {
background-image: url("data:image/svg+xml,@{svg}");
}
}
// Info Icon
.go-Main-banner .go-Message .go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
// Pkg.go Subheader
.go-Main-header {
background-color: @mantle;
}
// Pkg.go Fixed Header
.go-Main-header[data-raised="true"] {
background-color: @crust;
}
// Pkg.go Package Documentation Mobile Dropdown Icon
.go-Main-navMobile label.go-Label::before {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
}
// Pkg.go Mobile Navigation Drawer
.go-NavigationDrawer {
.go-NavigationDrawer-header {
border-bottom-color: @overlay2;
}
.go-NavigationDrawer-listItem--active {
background-color: fade(@accent, 30%);
}
}
//Pkg.go Search Bar
.go-SearchForm {
input[type="search"]::-webkit-search-cancel-button {
display: none;
}
}
.go-Footer {
background-color: @crust;
}
// Pkg.go Shortcut Helpers
.go-ShortcutKey::after {
background-color: @text;
}
// External Link Icon
.Homepage-helpLink,
.UnitFiles-titleLink,
a[href="https://www.meetup.com/pro/go"],
a[href="https://github.com/golang/go/wiki/Conferences"] {
@svg: escape(
''
);
img,
img.go-Icon,
img.go-Icon:not(.go-Icon--accented) {
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
a::after {
background-image: url("data:image/svg+xml,@{svg}");
}
}
// 'Jump to' Dialog - Desktop
.JumpDialog {
.JumpDialog-active {
color: @crust;
}
.go-Button[aria-label="Close"] img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
}
// Pkg.go Package Search Results
.SearchResults-header {
input[type="search"]::-webkit-search-cancel-button {
display: none;
}
}
// Search Icon
.SearchResults-header,
.go-SearchForm {
button[aria-label="Submit search"] img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
}
// Search Icon in pkg.go - Accented
form.Homepage-search--symbol::before {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
}
.ShortcutsDialog {
.go-Button[aria-label="Close"] img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
}
// Pkg.go Package Page
.UnitDetails {
#section-documentation img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
.UnitReadme-title img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
}
.UnitDirectories img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
.UnitFiles img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
// Pkg.go Package Details Section
.UnitMeta {
.UnitMeta-details {
img.go-Icon {
// Question Tooltip
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
img.go-Icon[alt="unchecked"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
img.go-Icon.go-Icon--accented[alt="checked"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
}
.UnitMeta-links {
img.go-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
filter: none;
}
img.depsdev-Icon {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
}
}
// Deprecated Chip
span.Documentation-deprecatedTag {
color: @crust;
}
// Code Snippet Highlights
pre {
.comment {
color: @overlay2;
}
ins {
color: @blue;
}
}
}
}
@-moz-document url-prefix("https://go.dev/tour") {
:root[data-theme="auto"],
:root:not([data-theme]) {
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor);
}
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor);
}
}
:root[data-theme="dark"] {
#catppuccin(@darkFlavor);
}
:root[data-theme="light"] {
#catppuccin(@lightFlavor);
}
#catppuccin(@flavor) {
@rosewater: @catppuccin[@@flavor][@rosewater];
@flamingo: @catppuccin[@@flavor][@flamingo];
@pink: @catppuccin[@@flavor][@pink];
@mauve: @catppuccin[@@flavor][@mauve];
@red: @catppuccin[@@flavor][@red];
@maroon: @catppuccin[@@flavor][@maroon];
@peach: @catppuccin[@@flavor][@peach];
@yellow: @catppuccin[@@flavor][@yellow];
@green: @catppuccin[@@flavor][@green];
@teal: @catppuccin[@@flavor][@teal];
@sky: @catppuccin[@@flavor][@sky];
@sapphire: @catppuccin[@@flavor][@sapphire];
@blue: @catppuccin[@@flavor][@blue];
@lavender: @catppuccin[@@flavor][@lavender];
@text: @catppuccin[@@flavor][@text];
@subtext1: @catppuccin[@@flavor][@subtext1];
@subtext0: @catppuccin[@@flavor][@subtext0];
@overlay2: @catppuccin[@@flavor][@overlay2];
@overlay1: @catppuccin[@@flavor][@overlay1];
@overlay0: @catppuccin[@@flavor][@overlay0];
@surface2: @catppuccin[@@flavor][@surface2];
@surface1: @catppuccin[@@flavor][@surface1];
@surface0: @catppuccin[@@flavor][@surface0];
@base: @catppuccin[@@flavor][@base];
@mantle: @catppuccin[@@flavor][@mantle];
@crust: @catppuccin[@@flavor][@crust];
@accent: @catppuccin[@@flavor][@@accentColor];
#editor-container {
#left-side {
.slide-content {
background-color: @base;
a {
color: @accent;
}
code {
background-color: @accent !important;
color: @crust;
}
h2,
li,
p {
color: @text;
}
pre {
background-color: @mantle;
color: @text;
}
}
.module-bar {
background-color: @mantle;
color: @text;
a {
color: @accent;
}
}
}
#right-side {
background-color: @base;
#explorer {
background-color: @mantle;
}
#file-editor {
.CodeMirror {
background-color: @base;
.CodeMirror-lines {
background-color: @base;
color: @text;
.CodeMirror-linenumber {
color: @overlay1;
}
span.cm-atom {
color: @blue;
}
span.cm-comment {
color: @peach;
}
span.cm-keyword {
color: @mauve;
}
span.cm-number {
color: @green;
}
span.cm-string {
color: @red;
}
span.cm-variable {
color: @text;
}
}
}
.CodeMirror-gutters {
background-color: @mantle;
border-right-color: @surface2;
}
}
#file-menu {
background-color: @mantle;
}
.output {
background-color: @base;
span.stdout {
color: @subtext0;
}
span.system {
color: @text;
}
}
a {
background-color: @text;
color: @crust;
}
a#run {
background-color: @accent;
}
pre.info {
background-color: @surface0 !important;
}
}
div[vertical-slide],
div[horizontal-slide] {
background-color: @surface2;
}
}
.toc {
background-color: @base;
.toc-page.ng-scope {
background-color: @mantle;
color: @text;
}
.toc-module.ng-scope {
background-color: @mantle;
span.ng-binding {
background-color: @base;
color: @accent;
}
.toc-lesson span.ng-binding {
background-color: @mantle;
color: @text;
}
}
}
.top-bar {
background-color: @crust;
color: @text;
span.nav {
svg {
fill: @text;
}
}
}
.wrapper.ng-scope {
background-color: @base;
.container {
background-color: @base;
.lesson.ng-scope {
background-color: @mantle;
}
h1,
p {
color: @text;
}
a {
color: @accent;
}
}
}
}
}
/* deno-fmt-ignore */
@catppuccin: {
@latte: { @rosewater: #dc8a78; @flamingo: #dd7878; @pink: #ea76cb; @mauve: #8839ef; @red: #d20f39; @maroon: #e64553; @peach: #fe640b; @yellow: #df8e1d; @green: #40a02b; @teal: #179299; @sky: #04a5e5; @sapphire: #209fb5; @blue: #1e66f5; @lavender: #7287fd; @text: #4c4f69; @subtext1: #5c5f77; @subtext0: #6c6f85; @overlay2: #7c7f93; @overlay1: #8c8fa1; @overlay0: #9ca0b0; @surface2: #acb0be; @surface1: #bcc0cc; @surface0: #ccd0da; @base: #eff1f5; @mantle: #e6e9ef; @crust: #dce0e8; };
@frappe: { @rosewater: #f2d5cf; @flamingo: #eebebe; @pink: #f4b8e4; @mauve: #ca9ee6; @red: #e78284; @maroon: #ea999c; @peach: #ef9f76; @yellow: #e5c890; @green: #a6d189; @teal: #81c8be; @sky: #99d1db; @sapphire: #85c1dc; @blue: #8caaee; @lavender: #babbf1; @text: #c6d0f5; @subtext1: #b5bfe2; @subtext0: #a5adce; @overlay2: #949cbb; @overlay1: #838ba7; @overlay0: #737994; @surface2: #626880; @surface1: #51576d; @surface0: #414559; @base: #303446; @mantle: #292c3c; @crust: #232634; };
@macchiato: { @rosewater: #f4dbd6; @flamingo: #f0c6c6; @pink: #f5bde6; @mauve: #c6a0f6; @red: #ed8796; @maroon: #ee99a0; @peach: #f5a97f; @yellow: #eed49f; @green: #a6da95; @teal: #8bd5ca; @sky: #91d7e3; @sapphire: #7dc4e4; @blue: #8aadf4; @lavender: #b7bdf8; @text: #cad3f5; @subtext1: #b8c0e0; @subtext0: #a5adcb; @overlay2: #939ab7; @overlay1: #8087a2; @overlay0: #6e738d; @surface2: #5b6078; @surface1: #494d64; @surface0: #363a4f; @base: #24273a; @mantle: #1e2030; @crust: #181926; };
@mocha: { @rosewater: #f5e0dc; @flamingo: #f2cdcd; @pink: #f5c2e7; @mauve: #cba6f7; @red: #f38ba8; @maroon: #eba0ac; @peach: #fab387; @yellow: #f9e2af; @green: #a6e3a1; @teal: #94e2d5; @sky: #89dceb; @sapphire: #74c7ec; @blue: #89b4fa; @lavender: #b4befe; @text: #f4f4f4; @subtext1: #e0e0e0; @subtext0: #c6c6c6; @overlay2: #a8a8a8; @overlay1: #8d8d8d; @overlay0: #6f6f6f; @surface2: #525252; @surface1: #393939; @surface0: #262626; @base: #161616; @mantle: #0b0b0b; @crust: #000000; };
};