Skip to content

Instantly share code, notes, and snippets.

@simicd
Last active December 29, 2019 15:19
Show Gist options
  • Save simicd/20d40cae61305aecdf372c4ac0cffc4a to your computer and use it in GitHub Desktop.
Save simicd/20d40cae61305aecdf372c4ac0cffc4a to your computer and use it in GitHub Desktop.
Jupyter Notebook styling sheet
/* Main section */
#notebook-container{
box-shadow: none !important; /* Remove box shadows */
max-width: 1000px;
}
.container {
width: 80% !important;
}
.notebook_app {
background: #fff !important;
}
/* Navigation bar */
body > #header,
body > #header .header-bar {
background: none;
}
.navbar-default {
background: none;
border: none;
}
.navbar-default .navbar-nav > li > a, #kernel_indicator,
.checkpoint_status,
.autosave_status {
color: #718096;
}
/* Navigation dropdowns */
.dropdown:hover {
background-color: #e2e8f0;
}
/* Navigation buttons */
#maintoolbar {
margin-left: 8px;
}
.toolbar .btn {
color: #553C9A;
border-color: transparent;
background-color: transparent;
}
.toolbar .btn:hover {
background-color: #e2e8f0;
}
/* Navigation notebook status */
.notification_widget {
border-color: transparent;
background-color: lightblue;
}
/* Navigation cell type dropdown */
select#cell_type,
select#cell_type:focus {
position: relative;
padding-left: 4px;
background-color: #e2e8f0;
border: 0 solid #e2e8f0;
box-shadow: none;
-webkit-box-shadow: none;
/* Remove selection box arrow */
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
/* background: url(http://www.stackoverflow.com/favicon.ico) 96% / 15% no-repeat #eee; */
}
/* Navigation logout button */
span#login_widget > .button, #logout, #shutdown {
background-color: transparent;
border-color: transparent;
}
/* Header cells */
.rendered_html h1, .rendered_html .h1,
.rendered_html h2, .rendered_html .h2,
.rendered_html h3, .rendered_html .h3,
.rendered_html h4, .rendered_html .h4,
.rendered_html h5, .rendered_html .h5,
.rendered_html h6, .rendered_html .h6,
#header-container > #save_widget {
font-family: -apple-system,
BlinkMacSystemFont,
Segoe UI,
Roboto,
Helvetica Neue,
Arial,
Noto Sans,
sans-serif,
Apple Color Emoji,
Segoe UI Emoji,
Segoe UI Symbol,
Noto Color Emoji;
font-weight: 500;
}
/* Header collapse arrow - align them right and center */
.collapsible_headings_toggle .h1,
.collapsible_headings_toggle .h2,
.collapsible_headings_toggle .h3,
.collapsible_headings_toggle .h4,
.collapsible_headings_toggle .h5,
.collapsible_headings_toggle .h6 {
margin: 0px !important;
}
/* Code cell */
div.cell {
transition: all 0.25s;
border: none;
position: relative;
top: 0;
}
div.prompt {
/* In[]/Out[] indicator - make smaller */
font-size: 0.8em;
margin-right: 12px;
}
div.input_prompt {
/* In[] indicator - move down to be in line with code cell */
margin-top: 12px;
}
div.output_prompt {
/* Out[] indicator - move down to be in line with code cell */
margin-top: 3px;
}
div.run_this_cell {
/* Remove hidden element */
display: none;
}
div.input_area {
border: 1px solid #f7f7f7; /* Add border around selected code cell */
border-radius: 3px;
background: #f7f7f7;
line-height: 1.5em;
/* margin: 0.5em 0; */
padding: 10px 5px;
}
div.cell.selected .input_area{
border: 1px solid #a5a5d5; /* Add border around selected code cell */
}
div.cell.unselected .output_area,
div.cell.selected .output_area {
padding: 1em 0;
overflow-x: auto;
}
div.output_scroll,
div.cell.selected .div.output_scroll
{
box-shadow: none;
margin: 0.5em 0 1em 0;
}
div.output_wrapper {
/* margin: 0 0 1em; */
transition: all 0.25s;
}
/* Code block within markdown (entries starting and ending with three backticks ```) */
.rendered_html pre code {
color: #444;
page-break-inside: avoid;
font-family: monospace;
max-width: 100%;
overflow: auto;
padding: 0.5em;
display: block;
word-wrap: break-word;
}
/* Table */
.dataframe {
background: #fff;
border-radius: 3px;
overflow: hidden;
margin-top: 0 !important;
}
.dataframe thead {
/* Table header color */
background-color: #f0f2f7;
}
.dataframe thead th,
.dataframe tbody td {
text-align: right;
}
.dataframe td {
/* Prevent that table body cells wrap the content */
white-space: nowrap;
}
.dataframe tr {
/* Light-grey row separation line */
border-bottom: 1px #2222 solid;
}
.dataframe tbody tr:nth-child(2n+1) {
/* Odd row number - do not color differently */
background: unset;
}
.dataframe tbody tr:nth-child(2n+1):hover {
/* Odd row number - use same focus color when hovering */
background: rgba(66, 165, 245, 0.2);
}
.dataframe > tbody > tr > th {
/* Index column(s) */
color: gray;
background-color: #f7f7f7;
vertical-align: middle !important;
}
.reveal table th, .reveal table td {
/*Ignore table border setting in RISE presentation */
border-bottom: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment