Skip to content

Instantly share code, notes, and snippets.

@Phoenix616
Last active October 18, 2023 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Phoenix616/d3d890b03892b799bf42a1d72c31fcd3 to your computer and use it in GitHub Desktop.
Save Phoenix616/d3d890b03892b799bf42a1d72c31fcd3 to your computer and use it in GitHub Desktop.
A style to revert the latest change to GitHub's dashboard/homepage/startpage/notifications. Screenshots (but outdated css): https://userstyles.org/styles/160093/
/* ==UserStyle==
@name Revert Github Changes
@namespace https://phoenix616.dev
@author Phoenix616 aka Max Lee (https://phoenix616.dev)
@version 1.2.26
@homepageURL https://gist.github.com/Phoenix616/d3d890b03892b799bf42a1d72c31fcd3/
@updateURL https://gist.github.com/Phoenix616/d3d890b03892b799bf42a1d72c31fcd3/raw/RevertGithubChanges.user.css
==/UserStyle== */
/**
Changelog:
v1.1: Add support for new full width dashboard
v1.2: Fix header and discovery removal
v1.2.1: Temporary fix for the .page-dashboard class getting removed :S This might break some other stuff on the site...
v1.2.2: Fix header. Again.
v1.2.3: Fix project page.
v1.2.4: Fix dashboard.
v1.2.5: Improve notification view (center it)
v1.2.6: Improve head and commit log width
v1.2.7: Fix head changes
v1.2.8: Fix centered dashboard applying to blame and other wide views
v1.2.9: Fix dashboard left bar not being moved to right anymore
v1.2.10: Fix dark mode issues
v1.2.11: Fix more dark mode issues
v1.2.12: Fix page head not being centered
v1.2.13: Fix dashboard left bar not being moved to right anymore
v1.2.14: Fix dashboard. Again!
v1.2.15: Fix page head
v1.2.16: Fix dashboard yet another time...
v1.2.17: Fix page head again
v1.2.18: Fix dashboard again
v1.2.19: Fix header again
v1.2.20: Fix gist header
v1.2.21: Bigger gist edit field
v1.2.22: Fix gist header width with long text
v1.2.23: Fix dashboard
v1.2.24: Fix header
v1.2.25: Fix code view with files sidebar
v1.2.26: Fix possible code view bug
**/
@-moz-document domain("github.com") {
/* Move left column to right */
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main div.d-md-flex.color-bg-inset aside.feed-left-sidebar {
position: absolute;
margin-left: 800px;
}
/* One Background color for everything */
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main div.d-md-flex.color-bg-inset {
background-color: inherit!important;
}
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main div.d-md-flex.color-bg-inset .border-bottom {
border-bottom: none!important;
}
/* Make news less wide */
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main div.d-md-flex.color-bg-inset .col-lg-8 {
width: 47.2%;
}
/* Still show alert boxes */
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main div.d-md-flex.color-bg-inset [aria-label="Explore"] {
position: absolute;
margin-left: 1000px;
border-bottom: 0px!important;
}
/* Remove border */
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main div.d-md-flex.color-bg-inset [aria-label="Account"] {
border-right: 0px!important;
}
/* Center header */
.AppHeader-localBar, .AppHeader-globalBar {
margin: auto;
width: 1280px;
justify-self: center;
}
/* center notification view */
.width-full.js-notifications-container {
margin: auto;
width: 1040px!important;
}
@media (min-width: 1280px) {
.width-full.js-notifications-container .col-xl-2 {
min-width: 230px;
}
}
/* Less wide commit log */
.commits-listing, .file-navigation {
max-width: 1280px;
margin: auto;
}
/* Less wide head */
#repository-container-header > div, #repository-container-header > nav,
.pt-3.hide-full-screen.mb-5 > div, .pt-3.hide-full-screen.mb-5 > nav {
max-width: 1280px;
margin: auto;
}
#repository-container-header, .pt-3.hide-full-screen.mb-5 {
box-shadow: inset 0 -1px 0 var(--color-border-muted)
}
.gisthead.pagehead .px-0 {
max-width: 1080px;
margin: auto;
}
@media (min-width: 1720px) {
.js-selected-navigation-item {
visibility: unset!important;
}
.js-responsive-underlinenav-overflow {
visibility: hidden;
}
}
/* Keep allignment of center code view static when opening left files view */
div[tabindex="0"][class^="Box-sc-"]:not([data-selector="repos-split-pane-content"]) {
position: absolute;
}
textarea + button + div > div[tabindex="0"][class^="Box-sc-"]:not([data-selector="repos-split-pane-content"]) {
position: unset;
}
/* Bigger gists edit field */
#gists .commit-create .CodeMirror {
height: 640px!important;
}
}
@-moz-document regexp("https\\://github\\.com/") {
/** Center news **/
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main .col-12.col-md-8.col-lg-6 {
max-width: 650px!important;
}
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main {
padding-left: 50%;
margin-left: -25%;
}
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main div.d-flex.flex-wrap.color-bg-canvas-insety {
width: 1402px;
}
/* White background */
html[data-color-mode="light"] /*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main .color-bg-canvas-inset {
background-color: #fff!important;
}
/* Dark background */
html[data-color-mode="dark"] /*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .application-main .color-bg-canvas-inset {
background-color: #0D1117!important;
}
/* Remove discovery */
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .feed-right-sidebar .mb-5 h2.f5 {
cursor: pointer;
}
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .feed-right-sidebar .mb-5 h2.f5 + div {
display: none;
}
/*.page-dashboard*//*.min-width-0*/.logged-in.env-production.page-responsive.full-width:not(.project-page) .feed-right-sidebar .mb-5:hover h2.f5 + div {
display: unset;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment