Skip to content

Instantly share code, notes, and snippets.

@bgoonz
Forked from practicalli-johnny/website.css
Created September 30, 2021 03:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgoonz/673405f4005452fdf5349adc8a465dc6 to your computer and use it in GitHub Desktop.
Save bgoonz/673405f4005452fdf5349adc8a465dc6 to your computer and use it in GitHub Desktop.
Example `styles/website.css` styles that over-ride Gitbook's own styles, specifically for code blocks and image alingment (centred).
/* @import url(https://fonts.googleapis.com/css?family=Raleway); */
@import url(https://fonts.googleapis.com/css?family=Ubuntu);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono);
/* Use Ubuntu font instead of the default Railway font */
body {
font-family: Ubuntu;
margin: 2rem;
font-size: 2rem;
}
/* Show keybindings to look like keys on a keyboard */
kbd {
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
padding: 0.1em 0.5em;
margin: 0 0.2em;
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
color: #000000;
background-color: #f7f7f7;
}
/* Over-ride maximum page width - default 800px
- if over-ridden then paging arrows can appear over text*/
.page-inner {
max-width: 1000px;
}
.book-body p , .book-body h1,.book-body h2,.book-body h3,.book-body h4,.book-body h5,.book-body h6,.book-body div,.book-body span , .summary , .summary li , .summary li a {
font-family : "Ubuntu", "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.book .book-body .page-wrapper .page-inner section.normal code {
font-family: "Ubuntu Mono", Consolas, Menlo, Courier, monospace;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
}
/* Place thin green boarder around code blocks & increase font size from 85% to 108% */
.book .book-body .page-wrapper .page-inner section.normal .highlight pre, .book .book-body .page-wrapper .page-inner section.normal pre {
background-color: #f7f7f7;
border: 5px solid #D9EDF7;
border-radius: 3px;
font-size: 108%;
line-height: 1.45;
overflow: auto;
padding: 16px;
}
/* red text for all non-language specific code sections & increased font size to 108% */
.book .book-body .page-wrapper .page-inner section.normal code {
background-color: #f7f7f7;
color: green;
border-radius: 3px;
font-size: 108%;
margin: 0;
padding: 0.2em 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment