Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/_jupyter.sass
1496 views
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
@use 'colors'
7
8
// I just noticed there is another version of this file in jupyter/_jupyter.sass
9
// They need to be carefully merged into one! But not today.
10
11
.smc-jupyter-nbviewer-content
12
border: 1px solid lightgray
13
14
.smc-jupyter-nbviewer
15
background: white
16
position: fixed
17
width: 100%
18
19
.smc-jupyter-notebook
20
background: white
21
width: 100%
22
left: 0px
23
min-height: 10em /* ensure path is covered while loading notebook */
24
25
.smc-jupyter-notebook-history-slider-controls
26
position: absolute
27
top: 8px
28
right: 5px
29
width: 80%
30
background: white
31
border: 2px solid orange
32
border-radius: 4px
33
padding: 20px
34
box-shadow: 5px 6px 4px lightgray
35
36
.smc-jupyter-notebook-history-slider
37
margin-top: 11px
38
39
.smc-jupyter-notebook-status-messages
40
font-size: 10pt
41
42
.smc-jupyter-notebook-danger
43
color: white
44
font-weight: bold
45
font-size: 7pt
46
background: red
47
48
.smc-jupyter-history-revision-number
49
font-size: 10pt
50
51
.smc-jupyter-history-revision-time
52
font-size: 10pt
53
54
/* Used for new sync. */
55
.smc-jupyter-cursor
56
position: absolute
57
width: 15em
58
z-index: 5 !important
59
60
.smc-jupyter-cursor-inside
61
height: 1.2em
62
width: 1px
63
64
.smc-jupyter-cursor-label
65
font-size: 8pt
66
font-family: serif
67
color: #fff
68
z-index: 1000
69
70
.smc-jupyter-notebook-notebook
71
width: 100%
72
73
.cc-jupyter-snippets
74
.ant-collapse-content-box
75
padding: 0 !important
76
77
span.hl
78
background-color: yellow
79
font-weight: bold
80
81
.cc-jupyter-snippet
82
> div.ant-collapse-header
83
color: colors.$COL_GRAY !important
84
85
.cc-jupyter-snippet-collapse
86
.cc-jupyter-snippet
87
border-radius: 2px
88
border: 0px
89
overflow: hidden
90
91
.cc-jupyter-snippet-content
92
background: white
93
margin: 0 10px 10px 10px
94
padding: 10px
95
border: 1px solid colors.$COL_GRAY_L
96
border-radius: 3px
97
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.22)
98
> pre
99
font-size: 80%
100
101
.cc-jupyter-snippet-header
102
vertical-align: -0.125em // to match ANTD's collapse icon
103
p
104
display: inline
105
106
// katex 0.13.5 somehow causes formulas to be displayed wider than the width of the output
107
// adding ugly horizontal scrollbar. this eliminates that.
108
.cocalc-jupyter-rendered
109
.katex-display>.katex>.katex-html
110
// display: contents // this did work, but it's some experimental new display option
111
margin: 1em .5em // margin works as well, but we also have to set it for mathjax to make it look consistent
112
.katex
113
padding: 0 2.5px
114
115
// this seems to be missing from jupyter widgets, but is used to implement the according
116
// https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html#accordion
117
// I.e., without this css rule, accordion is just broken.
118
.lm-Widget.lm-mod-hidden
119
display: none !important
120
121
.cc-jupyter-buttonbar-dropdown
122
.ant-dropdown-menu-item
123
color: colors.$COL_GRAY_D !important
124
125