File: custom_css.md

package info (click to toggle)
jupyter-notebook 7.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,116 kB
  • sloc: python: 544; javascript: 410; makefile: 182; sh: 51
file content (77 lines) | stat: -rw-r--r-- 1,715 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Applying Custom CSS

To apply custom CSS, you can add a `/custom/custom.css` file in the jupyter `config` directory. You can find the path, `~/.jupyter`, to this directory by running `jupyter --paths`. There you can create a folder named `custom` and create a `custom.css` file within the folder.

## Jupyter Styling

You can use a custom CSS file to modify default Jupyter styling.

```
/* Modify Jupyter Styles */
#top-panel-wrapper, #jp-top-bar {
  background-color: #aecad4!important;
}

#menu-panel-wrapper, #jp-MainMenu, #menu-panel {
  background-color: #aecad4!important;
}

.jp-NotebookPanel-toolbar {
  background-color:  #aecad4!important;
}
.lm-MenuBar-content {
  color: #02484d
}
```

![a screenshot custom jupyter styling](https://user-images.githubusercontent.com/12378147/245519958-17ce04e7-edc2-434e-8d93-a5c2de9fb225.png)

## Markdown

Another potential application for custom CSS is styling markdown.

```
/* Headings */
h1,
h2 {
  font-family: Impact, Charcoal, sans-serif;
  font-weight: bold;
  text-shadow: 2px 2px 4px #000000;
}

h1 {
  font-size: 52px;
  margin-bottom: 40px;
  color: #10929e;
  text-decoration: underline;

}

h2 {
  font-size: 448px;
  margin-bottom: 32px;
  color: #76b4be;
  text-transform: uppercase;
}

/* Block Quotes */
blockquote {
  font-family: Georgia, serif;
  font-size: 16px;
  color: #19085c;
  border-left: 8px solid #effffc;
  background-color: #eafcff;
  padding: 20px;
}

/* Lists */
ul,
ol {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 18px;
  color: #333333;
  margin-bottom: 24px;
}
```

![a screenshot of custom markdown styling](https://user-images.githubusercontent.com/12378147/245520291-968848d3-d336-4523-a046-023b15082ff8.png)