1
1
.span-array {
2
- --thead-background-color : var (--jp-layout-color4 , inherit);
3
- --thead-text-color : var (--jp-ui-font-color4 );
4
- --tbody-background-color-1 : var (--jp-layout-color2 , inherit);
5
- --tbody-background-color-2 : var (--jp-layout-color1 , inherit);
6
- --tbody-background-color-hover : var (--jp-layout-color3 , inherit);
7
- --tbody-background-color-disabled : var (--jp-layout-color4 , inherit );
2
+ --thead-background-color : var (--jp-layout-color1 , inherit);
3
+ --thead-text-color : var (--jp-ui-font-color1 , inherit );
4
+ --tbody-background-color-1 : var (--jp-layout-color1 , inherit);
5
+ --tbody-background-color-2 : var (--jp-layout-color2 , inherit);
6
+ --tbody-background-color-hover : var (--jp-rendermime-table-row-hover-background , var ( --jp- layout-color3, inherit) );
7
+ --tbody-background-color-disabled : var (--jp-layout-color4 , # ccccd1 );
8
8
--tbody-text-color : var (--jp-ui-font-color0 , inherit);
9
+ --tbody-text-color-disabled : var (--jp-ui-inverse-font-color0 , # b3b3b9 );
9
10
--table-font-family : var (--jp-content-font-family , var (--fallback-font-family , inherit));
10
11
12
+ --table-control-background : rgba (0 , 0 , 0 , 0.2 );
13
+ --table-control-color : var (--jp-ui-font-color0 );
14
+ --table-control-border : 1px solid rgba (0 , 0 , 0 , 0.8 );
15
+ --table-control-border-radius : 0.5em ;
16
+
11
17
--root-highlight : # a0c4ff ;
12
18
--nested-highlight : # ffadad ;
13
19
--hover-highlight : # ffd6a5 ;
14
20
15
21
--inverted-background-color : # 0B525B ;
16
22
--inverted-text-color : rgb (243 , 243 , 243 );
17
- --paragraph-border-color : transparent ;
23
+ --paragraph-border-color : var ( --jp-layout-color2 , inherit) ;
18
24
19
25
--fallback-font-family : -apple-system, BlinkMacSystemFont, 'Segoe UI' , Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans' , 'Helvetica Neue' , sans-serif
20
26
}
21
27
22
- /* These 2 CSS block sets variable overrides for JupyterLab's default themes */
23
- body [data-jp-theme-name = "JupyterLab Dark" ] .span-array {
24
- --thead-background-color : # 144552 ;
25
- --thead-text-color : whitesmoke;
26
- --tbody-background-color-1 : # 0B525B ;
27
- --tbody-background-color-2 : # 065A60 ;
28
- --tbody-background-color-hover : # 197072 ;
29
- --tbody-background-color-disabled : # 486669 ;
30
- --tbody-text-color : rgb (243 , 243 , 243 );
31
- --paragraph-border-color : # 1b1b1b ;
32
- }
33
-
34
- body [data-jp-theme-name = "JupyterLab Light" ] .span-array {
35
- --thead-background-color : # 0d2025 ;
36
- --thead-text-color : whitesmoke;
37
- --tbody-background-color-1 : # f0f0f0 ;
38
- --tbody-background-color-2 : # ececec ;
39
- --tbody-background-color-hover : # 6fd9db ;
40
- --tbody-background-color-disabled : # 9c9c9c ;
41
- --tbody-text-color : rgb (0 , 0 , 0 );
42
- --paragraph-border-color : # f1f1f1 ;
43
- }
44
-
45
28
/* Table of span offsets */
46
29
.span-array > .document > table {
47
30
table-layout : auto;
48
- border-radius : 1em 1em 0 0 ;
49
31
overflow : hidden;
50
32
width : 100% ;
51
33
border-collapse : collapse;
@@ -64,7 +46,6 @@ body[data-jp-theme-name="JupyterLab Light"] .span-array {
64
46
65
47
.span-array > .document > table > tbody > tr : nth-child (2n+1) {
66
48
background-color : var (--tbody-background-color-1 );
67
- color : var (--tbody-text-color );
68
49
}
69
50
70
51
.span-array > .document > table > tbody > tr : nth-child (2n) {
@@ -73,17 +54,74 @@ body[data-jp-theme-name="JupyterLab Light"] .span-array {
73
54
74
55
.span-array > .document > table td {
75
56
padding : 0.5em ;
76
- color : var (--tbody-text-color )
57
+ color : var (--tbody-text-color );
77
58
}
78
59
79
60
.span-array > .document > table tr > td : last-child , .span-array > .document > table tr > th : last-child {
80
61
text-align : right;
62
+ width : 100% ;
81
63
}
82
64
83
65
.span-array > .document > table tr > td : not (tr > td : last-child ), .span-array > .document > table tr > th : not (tr > th : last-child ) {
84
66
text-align : left;
85
67
}
86
68
69
+ .span-array > .document > table tr .hover : nth-child (n), .span-array > .document > table tr .highlighted : nth-child (n) {
70
+ background-color : var (--tbody-background-color-hover );
71
+ }
72
+
73
+ .span-array > .document > table tr .disabled : nth-child (n), .span-array > .document > table tr .disabled .hover : nth-child (n) {
74
+ background-color : var (--tbody-background-color-disabled );
75
+ }
76
+
77
+ .span-array > .document > table tr .disabled : nth-child (n)> td , .span-array > .document > table tr .disabled .hover : nth-child (n)> td {
78
+ color : var (--tbody-text-color-disabled );
79
+ }
80
+
81
+ /* Table control buttons */
82
+
83
+ .span-array > .document > table td : first-child {
84
+ vertical-align : center;
85
+ }
86
+
87
+ .span-array > .document > table td : first-child > div .sa-table-controls {
88
+ display : flex;
89
+ flex-direction : row;
90
+ }
91
+
92
+ .span-array > .document > table td : first-child button {
93
+ background-color : var (--table-control-background );
94
+ color : var (--table-control-color );
95
+ border : var (--table-control-border );
96
+ border-right : none;
97
+ border-radius : 0 ;
98
+ cursor : pointer;
99
+ }
100
+
101
+ .span-array > .document > table td : first-child button : first-child {
102
+ border-radius : var (--table-control-border-radius ) 0 0 var (--table-control-border-radius );
103
+ }
104
+
105
+ .span-array > .document > table td : first-child button : last-child {
106
+ border-radius : 0 var (--table-control-border-radius ) var (--table-control-border-radius ) 0 ;
107
+ border-right : var (--table-control-border );
108
+ }
109
+
110
+ .span-array > .document > table td : first-child button [data-control = "visibility" ]: hover {
111
+ background-color : var (--root-highlight );
112
+ color : black;
113
+ }
114
+
115
+ .span-array > .document > table tr : not (tr .disabled ) td : first-child button [data-control = "highlight" ]: hover {
116
+ background-color : var (--hover-highlight );
117
+ color : black;
118
+ }
119
+
120
+ .span-array > .document > table tr .highlighted : not (tr .disabled ) td : first-child button [data-control = "highlight" ] {
121
+ background-color : var (--hover-highlight );
122
+ color : black;
123
+ }
124
+
87
125
/* Styling for spans within document context */
88
126
.span-array > .document > p {
89
127
border : 1px solid var (--paragraph-border-color );
@@ -103,6 +141,7 @@ body[data-jp-theme-light="false"].span-array>.document>p {
103
141
.span-array > .document > p mark {
104
142
padding : 0.4em 0.4em ;
105
143
border-radius : 0.35em ;
144
+ cursor : pointer;
106
145
}
107
146
108
147
.span-array > .document > p mark {
@@ -125,4 +164,9 @@ body[data-jp-theme-light="false"].span-array>.document>p {
125
164
font-variant-caps : all-small-caps;
126
165
margin-left : 8px ;
127
166
text-transform : uppercase;
167
+ }
168
+
169
+ .span-array > .document > p mark .hover , .span-array .span-array > .document > p mark > mark .hover , .span-array > .document > p mark .complex-set .hover , .span-array > .document > p mark .highlighted , .span-array > .document > p mark .complex-set .highlighted , .span-array .span-array > .document > p mark > mark .highlighted {
170
+ background : none;
171
+ background-color : var (--hover-highlight );
128
172
}
0 commit comments