UNPKG

5.8 kBCSSView Raw
1/*-----------------------------------------------------------------------------
2| Copyright (c) Jupyter Development Team.
3| Distributed under the terms of the Modified BSD License.
4|----------------------------------------------------------------------------*/
5
6/*-----------------------------------------------------------------------------
7| Private CSS variables
8|----------------------------------------------------------------------------*/
9
10:root {
11 --jp-private-cell-scrolling-output-offset: 5px;
12}
13
14/*-----------------------------------------------------------------------------
15| Cell
16|----------------------------------------------------------------------------*/
17
18.jp-Cell {
19 padding: var(--jp-cell-padding);
20 margin: 0px;
21 border: none;
22 outline: none;
23 background: transparent;
24}
25
26/*-----------------------------------------------------------------------------
27| Common input/output
28|----------------------------------------------------------------------------*/
29
30.jp-Cell-inputWrapper,
31.jp-Cell-outputWrapper {
32 display: flex;
33 flex-direction: row;
34 padding: 0px;
35 margin: 0px;
36 /* Added to reveal the box-shadow on the input and output collapsers. */
37 overflow: visible;
38}
39
40/* Only input/output areas inside cells */
41.jp-Cell-inputArea,
42.jp-Cell-outputArea {
43 flex: 1 1 auto;
44}
45
46/*-----------------------------------------------------------------------------
47| Collapser
48|----------------------------------------------------------------------------*/
49
50/* Make the output collapser disappear when there is not output, but do so
51 * in a manner that leaves it in the layout and preserves its width.
52 */
53.jp-Cell.jp-mod-noOutputs .jp-Cell-outputCollapser {
54 border: none !important;
55 background: transparent !important;
56}
57
58.jp-Cell:not(.jp-mod-noOutputs) .jp-Cell-outputCollapser {
59 min-height: var(--jp-cell-collapser-min-height);
60}
61
62/*-----------------------------------------------------------------------------
63| Output
64|----------------------------------------------------------------------------*/
65
66/* Put a space between input and output when there IS output */
67.jp-Cell:not(.jp-mod-noOutputs) .jp-Cell-outputWrapper {
68 margin-top: 5px;
69}
70
71.jp-CodeCell.jp-mod-outputsScrolled .jp-Cell-outputArea {
72 overflow-y: auto;
73 max-height: 24em;
74 margin-left: var(--jp-private-cell-scrolling-output-offset);
75}
76
77.jp-CodeCell.jp-mod-outputsScrolled .jp-Cell-outputArea::after {
78 content: ' ';
79 box-shadow: inset 0 0 6px 2px rgb(0 0 0 / 30%);
80 width: 100%;
81 height: 100%;
82 position: sticky;
83 bottom: 0;
84 top: 0;
85 margin-top: -50%;
86 float: left;
87 display: block;
88 pointer-events: none;
89}
90
91.jp-CodeCell.jp-mod-outputsScrolled .jp-OutputArea-child {
92 padding-top: 6px;
93}
94
95.jp-CodeCell.jp-mod-outputsScrolled .jp-OutputArea-prompt {
96 flex: 0 0
97 calc(
98 var(--jp-cell-prompt-width) -
99 var(--jp-private-cell-scrolling-output-offset)
100 );
101}
102
103/*-----------------------------------------------------------------------------
104| CodeCell
105|----------------------------------------------------------------------------*/
106
107/*-----------------------------------------------------------------------------
108| MarkdownCell
109|----------------------------------------------------------------------------*/
110
111.jp-MarkdownOutput {
112 flex: 1 1 auto;
113 margin-top: 0;
114 margin-bottom: 0;
115 padding-left: var(--jp-code-padding);
116}
117
118.jp-MarkdownOutput.jp-RenderedHTMLCommon {
119 overflow: auto;
120}
121
122/* collapseHeadingButton (show always if hiddenCellsButton is _not_ shown) */
123.jp-collapseHeadingButton {
124 display: none;
125 min-height: var(--jp-cell-collapser-min-height);
126 position: absolute;
127 right: 0;
128 top: 0;
129 bottom: 0;
130 background-color: transparent;
131 background-size: 25px;
132 background-repeat: no-repeat;
133 background-position-x: center;
134 background-position-y: top;
135 background-image: var(--jp-icon-caret-down);
136 border: none;
137 cursor: pointer;
138}
139
140.jp-collapseHeadingButton:hover {
141 background-color: var(--jp-layout-color2);
142}
143
144.jp-collapseHeadingButton.jp-mod-collapsed {
145 background-image: var(--jp-icon-caret-right);
146}
147
148:is(.jp-MarkdownCell:hover, .jp-mod-active) .jp-collapseHeadingButton {
149 display: flex;
150}
151
152/*
153 set the container font size to match that of content
154 so that the nested collapse buttons have the right size
155*/
156.jp-MarkdownCell .jp-InputPrompt {
157 font-size: var(--jp-content-font-size1);
158}
159
160/*
161 Align collapseHeadingButton with cell top header
162 The font sizes are identical to the ones in packages/rendermime/style/base.css
163*/
164.jp-collapseHeadingButton[data-heading-level='1'] {
165 font-size: var(--jp-content-font-size5);
166 background-position-y: calc(0.3 * var(--jp-content-font-size5));
167}
168
169.jp-collapseHeadingButton[data-heading-level='2'] {
170 font-size: var(--jp-content-font-size4);
171 background-position-y: calc(0.3 * var(--jp-content-font-size4));
172}
173
174.jp-collapseHeadingButton[data-heading-level='3'] {
175 font-size: var(--jp-content-font-size3);
176 background-position-y: calc(0.3 * var(--jp-content-font-size3));
177}
178
179.jp-collapseHeadingButton[data-heading-level='4'] {
180 font-size: var(--jp-content-font-size2);
181 background-position-y: calc(0.3 * var(--jp-content-font-size2));
182}
183
184.jp-collapseHeadingButton[data-heading-level='5'] {
185 font-size: var(--jp-content-font-size1);
186 background-position-y: top;
187}
188
189.jp-collapseHeadingButton[data-heading-level='6'] {
190 font-size: var(--jp-content-font-size0);
191 background-position-y: top;
192}
193
194.jp-showHiddenCellsButton {
195 margin-left: calc(var(--jp-cell-prompt-width) + 2 * var(--jp-code-padding));
196 margin-top: var(--jp-code-padding);
197 border: 1px solid var(--jp-border-color2);
198 background-color: var(--jp-border-color3) !important;
199 color: var(--jp-content-font-color0) !important;
200}
201
202.jp-showHiddenCellsButton:hover {
203 background-color: var(--jp-border-color2) !important;
204}