Skip to content

Commit e41db47

Browse files
committed
fixing css
1 parent 0b9887a commit e41db47

File tree

11 files changed

+61
-47
lines changed

11 files changed

+61
-47
lines changed

app/root.res

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
@module("./styles/main.css?url")
2+
external mainCss: string = "default"
3+
4+
@module("./styles/utils.css?url")
5+
external utilsCss: string = "default"
6+
7+
@module("./styles/_hljs.css?url")
8+
external hljsCss: string = "default"
9+
// import "../styles/main.css";
10+
// import "../styles/_hljs.css";
11+
// import "../styles/utils.css";
12+
113
%%raw(`
2-
import "../styles/main.css";
3-
import "../styles/_hljs.css";
4-
import "../styles/utils.css";
514
615
import hljs from 'highlight.js/lib/core';
716
import bash from 'highlight.js/lib/languages/bash';
@@ -34,6 +43,9 @@ let default = () => {
3443
<Links />
3544
<Meta />
3645
<link rel="icon" href="/favicon.ico" />
46+
<link rel="stylesheet" href={mainCss} />
47+
<link rel="stylesheet" href={utilsCss} />
48+
<link rel="stylesheet" href={hljsCss} />
3749
<meta charSet="UTF-8" />
3850
</head>
3951
<body>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

styles/main.css renamed to app/styles/main.css

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -299,70 +299,70 @@
299299
}
300300
}
301301

302-
.CodeMirror {
302+
.cm-editor {
303303
@apply h-full;
304304
background-color: inherit;
305305
color: inherit;
306306
}
307307

308-
.CodeMirror-gutters .errors {
308+
.cm-gutters .errors {
309309
/*@apply bg-white text-red-500;*/
310310
@apply w-6;
311311
background-color: inherit;
312312
}
313313

314-
/*.CodeMirror-scroll {*/
314+
/*.cm-scroller {*/
315315
/*min-height: 40vh;*/
316316
/*}*/
317317

318-
.cm-s-material.CodeMirror {
318+
.cm-s-material.mc-editor {
319319
/*background-color: #263238;*/
320320
@apply font-mono;
321321
/*py-8;*/
322322
}
323323

324-
.cm-s-material .CodeMirror-gutters {
324+
.cm-s-material .cm-gutters {
325325
/*@apply text-gray-80;*/
326326
border: none;
327327
background-color: inherit;
328328
color: inherit;
329329
}
330330

331-
/*.CodeMirror pre.CodeMirror-line,*/
332-
/*.CodeMirror pre.CodeMirror-line-like {*/
331+
/*.CodeMirror pre.cm-line,*/
332+
/*.CodeMirror pre.cm-line-like {*/
333333
/*}*/
334334

335-
.cm-s-material .CodeMirror-guttermarker,
336-
.cm-s-material .CodeMirror-guttermarker-subtle,
337-
.cm-s-material .CodeMirror-linenumber {
335+
.cm-s-material .cm-guttermarker,
336+
.cm-s-material .cm-guttermarker-subtle,
337+
.cm-s-material .cm-linenumber {
338338
@apply text-gray-80;
339339
}
340340

341-
.cm-s-material .CodeMirror-cursor {
341+
.cm-s-material .cm-cursor {
342342
border-left: 1px solid #ffcc00;
343343
}
344344

345-
.cm-s-material div.CodeMirror-selected {
345+
.cm-s-material div.cm-selected {
346346
background: rgba(128, 203, 196, 0.2);
347347
}
348348

349-
.cm-s-material.CodeMirror-focused div.CodeMirror-selected {
349+
.cm-s-material.cm-focused div.cm-selected {
350350
background: rgba(128, 203, 196, 0.2);
351351
}
352352

353-
.cm-s-material .CodeMirror-line::selection,
354-
.cm-s-material .CodeMirror-line > span::selection,
355-
.cm-s-material .CodeMirror-line > span > span::selection {
353+
.cm-s-material .cm-line::selection,
354+
.cm-s-material .cm-line > span::selection,
355+
.cm-s-material .cm-line > span > span::selection {
356356
background: rgba(128, 203, 196, 0.2);
357357
}
358358

359-
.cm-s-material .CodeMirror-line::-moz-selection,
360-
.cm-s-material .CodeMirror-line > span::-moz-selection,
361-
.cm-s-material .CodeMirror-line > span > span::-moz-selection {
359+
.cm-s-material .cm-line::-moz-selection,
360+
.cm-s-material .cm-line > span::-moz-selection,
361+
.cm-s-material .cm-line > span > span::-moz-selection {
362362
background: rgba(128, 203, 196, 0.2);
363363
}
364364

365-
.cm-s-material .CodeMirror-activeline-background {
365+
.cm-s-material .cm-activeline-background {
366366
background: rgba(0, 0, 0, 0.5);
367367
}
368368

@@ -435,7 +435,7 @@
435435
@apply text-gray-30;
436436
}
437437

438-
.cm-s-material .cm-tag {
438+
.cm-tag {
439439
color: #ff5370;
440440
}
441441

@@ -465,14 +465,14 @@
465465
background-color: #ff5370;
466466
}
467467

468-
.cm-s-material .CodeMirror-matchingbracket {
468+
.cm-s-material .cm-matchingbracket {
469469
text-decoration: underline;
470470
color: white !important;
471471
}
472472

473473
/* simplescrollbars style */
474-
.CodeMirror-simplescroll-horizontal div,
475-
.CodeMirror-simplescroll-vertical div {
474+
.cm-simplescroll-horizontal div,
475+
.cm-simplescroll-vertical div {
476476
position: absolute;
477477
background: #ccc;
478478
-moz-box-sizing: border-box;
@@ -481,71 +481,71 @@
481481
border-radius: 2px;
482482
}
483483

484-
.CodeMirror-simplescroll-horizontal,
485-
.CodeMirror-simplescroll-vertical {
484+
.cm-simplescroll-horizontal,
485+
.cm-simplescroll-vertical {
486486
position: absolute;
487487
z-index: 6;
488488
background: #eee;
489489
}
490490

491-
.CodeMirror-simplescroll-horizontal {
491+
.cm-simplescroll-horizontal {
492492
bottom: 0;
493493
left: 0;
494494
height: 8px;
495495
}
496496

497-
.CodeMirror-simplescroll-horizontal div {
497+
.cm-simplescroll-horizontal div {
498498
bottom: 0;
499499
height: 100%;
500500
}
501501

502-
.CodeMirror-simplescroll-vertical {
502+
.cm-simplescroll-vertical {
503503
right: 0;
504504
top: 0;
505505
width: 8px;
506506
}
507507

508-
.CodeMirror-simplescroll-vertical div {
508+
.cm-simplescroll-vertical div {
509509
right: 0;
510510
width: 100%;
511511
}
512512

513-
.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler,
514-
.CodeMirror-overlayscroll .CodeMirror-gutter-filler {
513+
.cm-overlayscroll .cm-scrollbar-filler,
514+
.cm-overlayscroll .cm-gutter-filler {
515515
display: none;
516516
}
517517

518-
.CodeMirror-overlayscroll-horizontal div,
519-
.CodeMirror-overlayscroll-vertical div {
518+
.cm-overlayscroll-horizontal div,
519+
.cm-overlayscroll-vertical div {
520520
position: absolute;
521521
background: #bcd;
522522
border-radius: 3px;
523523
}
524524

525-
.CodeMirror-overlayscroll-horizontal,
526-
.CodeMirror-overlayscroll-vertical {
525+
.cm-overlayscroll-horizontal,
526+
.cm-overlayscroll-vertical {
527527
position: absolute;
528528
z-index: 6;
529529
}
530530

531-
.CodeMirror-overlayscroll-horizontal {
531+
.cm-overlayscroll-horizontal {
532532
bottom: 0;
533533
left: 0;
534534
height: 6px;
535535
}
536536

537-
.CodeMirror-overlayscroll-horizontal div {
537+
.cm-overlayscroll-horizontal div {
538538
bottom: 0;
539539
height: 100%;
540540
}
541541

542-
.CodeMirror-overlayscroll-vertical {
542+
.cm-overlayscroll-vertical {
543543
right: 0;
544544
top: 0;
545545
width: 6px;
546546
}
547547

548-
.CodeMirror-overlayscroll-vertical div {
548+
.cm-overlayscroll-vertical div {
549549
right: 0;
550550
width: 100%;
551551
}
File renamed without changes.

src/components/CodeExample.res

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
%%raw(`import "../../styles/_hljs.css";`)
2-
31
let langShortname = (lang: string) =>
42
switch lang {
53
| "ocaml" => "ml"

0 commit comments

Comments
 (0)