Skip to content

Instantly share code, notes, and snippets.

@jnrbsn
Created September 14, 2010 01:24
Show Gist options
  • Save jnrbsn/578379 to your computer and use it in GitHub Desktop.
Save jnrbsn/578379 to your computer and use it in GitHub Desktop.
Better styles for embedding GitHub Gists
/* Better styles for embedding GitHub Gists */
.gist{font-size:13px;line-height:18px;margin-bottom:20px;width:100%}
.gist pre{font-family:Menlo,Monaco,'Bitstream Vera Sans Mono','Courier New',monospace !important}
.gist-meta{font-family:Helvetica,Arial,sans-serif;font-size:13px !important}
.gist-meta a{color:#26a !important;text-decoration:none}
.gist-meta a:hover{color:#0e4071 !important}
@kensoh
Copy link

kensoh commented Jan 14, 2017

Hi @ksobon, yes there are different properties to control the default css of GitHub gist. I did that in this project by making all the borders white and making sure I define the properties after the embedded js - https://github.com/tebelorg/TA.Gist (PHP template that displays your GitHub gists as blog posts)

@sharifulislam52
Copy link

I don't know why. But the "font-size" property dont work for ".gist".

@M2skills
Copy link

great man Thanks!

@minimul
Copy link

minimul commented May 7, 2020

I did this

    /* Styling embedded gists */
    .blob-code, .blob-num {      
       font-size: 18px !important;
    }
    .gist-meta {      
       display: none;
    }
    /* End styling embedded gists */

@vishalsingha
Copy link

thanks man

@carlaizumibamford
Copy link

I removed the 53em from .gist as it was breaking my design but thanks for sharing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment