@zzish/math-rich-input 0.1.40 → 0.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,11 +11,7 @@
11
11
  border-radius: 5px;
12
12
  }
13
13
 
14
- .MathRichInput-Container:focus-within {
15
- background-color: white !important;
16
- outline: 0px;
17
- border: 1px solid #663676;
18
- }
14
+
19
15
 
20
16
  .MathRichInput-scrollview {
21
17
  position: relative;
@@ -78,6 +74,168 @@
78
74
  padding: 2px;
79
75
  margin: 0px 2px;
80
76
  }
77
+
78
+ .MathRichInput-Container {
79
+ :focus-within {
80
+ background-color: white;
81
+ outline: 0px;
82
+ /* border: 1px solid #663676; */
83
+ }
84
+
85
+ &.dark {
86
+ :focus-within {
87
+ background: none;
88
+ outline: 0px;
89
+ border: none;
90
+ }
91
+ .MathRichInput {
92
+ background: none;
93
+ color: white;
94
+ border: none;
95
+
96
+ .katex {
97
+ .base {
98
+ background: none;
99
+ }
100
+ }
101
+
102
+ &:focus {
103
+ border: none;
104
+ background: none;
105
+ }
106
+ }
107
+ }
108
+ }
109
+ /* Note that the top left position of the toolbar is set programatically in componentDidMount */
110
+
111
+ .Toolbar {
112
+ position: absolute;
113
+ z-index: 1;
114
+ display: flex;
115
+ height: 42px;
116
+ background-color: white;
117
+ border: 1px solid #d0d0d0;
118
+ border-radius: 5px;
119
+ box-shadow: 1px 1px 5px #a0a0a0;
120
+ animation: 0.5s fadeIn1;
121
+ animation-fill-mode: forwards;
122
+ }
123
+
124
+ @keyframes fadeIn1 {
125
+ 0% {
126
+ opacity: 0;
127
+ }
128
+ 100% {
129
+ opacity: 1;
130
+ }
131
+ }
132
+
133
+ .Toolbar-button {
134
+ font-family: sans-serif;
135
+ font-size: 16px;
136
+ width: 40px;
137
+ height: 36px;
138
+ background-color: white;
139
+ border-radius: 5px;
140
+ border: 0px;
141
+ padding: 1px;
142
+ margin: 2px;
143
+ }
144
+
145
+ .Toolbar-button:hover {
146
+ color: white;
147
+ background: #663676;
148
+ cursor: pointer;
149
+ }
150
+
151
+ .Toolbar-button:active {
152
+ background: #808080;
153
+ color: white;
154
+ cursor: pointer;
155
+ }
156
+
157
+ .TB-narrow {
158
+ width: 30px;
159
+ }
160
+
161
+ .TB-wide {
162
+ width: 46px;
163
+ }
164
+
165
+ .TB-selected {
166
+ background: #d0d0d0;
167
+ color: black;
168
+ cursor: pointer;
169
+ animation: 0.2s TB-fadeIn;
170
+ animation-fill-mode: forwards;
171
+ }
172
+
173
+ .TB-selected:hover {
174
+ color: white;
175
+ background: #663676;
176
+ cursor: pointer;
177
+ }
178
+
179
+ @keyframes TB-fadeIn {
180
+ 00% {
181
+ background: white;
182
+ }
183
+ 100% {
184
+ background: #d0d0d0;
185
+ }
186
+ }
187
+
188
+ /* Tooltip text */
189
+ .Toolbar-button .tooltiptext {
190
+ font-weight: normal;
191
+ visibility: hidden;
192
+ width: 100px;
193
+ background-color: #222;
194
+ color: #fff;
195
+ /*font-weight: bold;*/
196
+ font-size: 12px;
197
+ text-align: center;
198
+ padding: 4px 10px;
199
+ border-radius: 6px;
200
+
201
+ /* Position the tooltip text - see examples below! */
202
+ position: absolute;
203
+ z-index: 2;
204
+ top: -90%; /* Must leave a small gap between tooltip and button */
205
+ left: 50px;
206
+
207
+ /* transform: translate (50%,0%); */
208
+ }
209
+
210
+ /* Show the tooltip text when you mouse over the tooltip container */
211
+ .Toolbar-button:hover .tooltiptext {
212
+ animation: 0.8s fadeIn2;
213
+ animation-fill-mode: forwards;
214
+ visibility: visible;
215
+ /* width: 100px; */
216
+ /* top: -90%; */ /* Must leave a small gap between tooltip and button */
217
+ /* left: 20%; */
218
+ /* margin-left: -50px; */
219
+ }
220
+
221
+ @keyframes fadeIn2 {
222
+ 00% {
223
+ opacity: 0;
224
+ }
225
+ 70% {
226
+ opacity: 0;
227
+ }
228
+ 100% {
229
+ visibility: visible;
230
+ opacity: 0.9;
231
+ }
232
+ }
233
+
234
+ /* .tooltip {
235
+ position: relative;
236
+ display: inline-block;
237
+ border-bottom: 1px dotted black; /* If you want dots under the hoverable text
238
+ } */
81
239
  .EquationEditorModal-background {
82
240
  position: fixed;
83
241
  top: 0;
@@ -233,136 +391,6 @@
233
391
  .EquationEditorModal .slider.round:before {
234
392
  border-radius: 50%;
235
393
  }
236
- /* Note that the top left position of the toolbar is set programatically in componentDidMount */
237
-
238
- .Toolbar {
239
- position: absolute;
240
- z-index: 1;
241
- display: flex;
242
- height: 42px;
243
- background-color: white;
244
- border: 1px solid #d0d0d0;
245
- border-radius: 5px;
246
- box-shadow: 1px 1px 5px #a0a0a0;
247
- animation: 0.5s fadeIn1;
248
- animation-fill-mode: forwards;
249
- }
250
-
251
- @keyframes fadeIn1 {
252
- 0% {
253
- opacity: 0;
254
- }
255
- 100% {
256
- opacity: 1;
257
- }
258
- }
259
-
260
- .Toolbar-button {
261
- font-family: sans-serif;
262
- font-size: 16px;
263
- width: 40px;
264
- height: 36px;
265
- background-color: white;
266
- border-radius: 5px;
267
- border: 0px;
268
- padding: 1px;
269
- margin: 2px;
270
- }
271
-
272
- .Toolbar-button:hover {
273
- color: white;
274
- background: #663676;
275
- cursor: pointer;
276
- }
277
-
278
- .Toolbar-button:active {
279
- background: #808080;
280
- color: white;
281
- cursor: pointer;
282
- }
283
-
284
- .TB-narrow {
285
- width: 30px;
286
- }
287
-
288
- .TB-wide {
289
- width: 46px;
290
- }
291
-
292
- .TB-selected {
293
- background: #d0d0d0;
294
- color: black;
295
- cursor: pointer;
296
- animation: 0.2s TB-fadeIn;
297
- animation-fill-mode: forwards;
298
- }
299
-
300
- .TB-selected:hover {
301
- color: white;
302
- background: #663676;
303
- cursor: pointer;
304
- }
305
-
306
- @keyframes TB-fadeIn {
307
- 00% {
308
- background: white;
309
- }
310
- 100% {
311
- background: #d0d0d0;
312
- }
313
- }
314
-
315
- /* Tooltip text */
316
- .Toolbar-button .tooltiptext {
317
- font-weight: normal;
318
- visibility: hidden;
319
- width: 100px;
320
- background-color: #222;
321
- color: #fff;
322
- /*font-weight: bold;*/
323
- font-size: 12px;
324
- text-align: center;
325
- padding: 4px 10px;
326
- border-radius: 6px;
327
-
328
- /* Position the tooltip text - see examples below! */
329
- position: absolute;
330
- z-index: 2;
331
- top: -90%; /* Must leave a small gap between tooltip and button */
332
- left: 50px;
333
-
334
- /* transform: translate (50%,0%); */
335
- }
336
-
337
- /* Show the tooltip text when you mouse over the tooltip container */
338
- .Toolbar-button:hover .tooltiptext {
339
- animation: 0.8s fadeIn2;
340
- animation-fill-mode: forwards;
341
- visibility: visible;
342
- /* width: 100px; */
343
- /* top: -90%; */ /* Must leave a small gap between tooltip and button */
344
- /* left: 20%; */
345
- /* margin-left: -50px; */
346
- }
347
-
348
- @keyframes fadeIn2 {
349
- 00% {
350
- opacity: 0;
351
- }
352
- 70% {
353
- opacity: 0;
354
- }
355
- 100% {
356
- visibility: visible;
357
- opacity: 0.9;
358
- }
359
- }
360
-
361
- /* .tooltip {
362
- position: relative;
363
- display: inline-block;
364
- border-bottom: 1px dotted black; /* If you want dots under the hoverable text
365
- } */
366
394
  /* Note that the top left position of the accent bar is set programatically in componentDidMount */
367
395
 
368
396
  .AccentBar {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzish/math-rich-input",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "description": "React component for user to enter rich text with embedded math equations.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,11 +11,7 @@
11
11
  border-radius: 5px;
12
12
  }
13
13
 
14
- .MathRichInput-Container:focus-within {
15
- background-color: white !important;
16
- outline: 0px;
17
- border: 1px solid #663676;
18
- }
14
+
19
15
 
20
16
  .MathRichInput-scrollview {
21
17
  position: relative;
@@ -78,3 +74,35 @@
78
74
  padding: 2px;
79
75
  margin: 0px 2px;
80
76
  }
77
+
78
+ .MathRichInput-Container {
79
+ :focus-within {
80
+ background-color: white;
81
+ outline: 0px;
82
+ /* border: 1px solid #663676; */
83
+ }
84
+
85
+ &.dark {
86
+ :focus-within {
87
+ background: none;
88
+ outline: 0px;
89
+ border: none;
90
+ }
91
+ .MathRichInput {
92
+ background: none;
93
+ color: white;
94
+ border: none;
95
+
96
+ .katex {
97
+ .base {
98
+ background: none;
99
+ }
100
+ }
101
+
102
+ &:focus {
103
+ border: none;
104
+ background: none;
105
+ }
106
+ }
107
+ }
108
+ }