]> BookStack Code Mirror - bookstack/blob - resources/sass/_codemirror.scss
CM6: Aligned styling with existing, improved theme handling
[bookstack] / resources / sass / _codemirror.scss
1 /**
2  * Custom CodeMirror BookStack overrides
3  */
4
5 .cm-editor {
6   font-size: 12px;
7   border: 1px solid;
8   @include lightDark(border-color, #ddd, #444);
9   margin-bottom: $-l;
10   line-height: 1.4;
11   border-radius: 4px;
12 }
13
14 /**
15  * Custom Copy Button
16  */
17 .cm-copy-button {
18   position: absolute;
19   display: flex;
20   align-items: center;
21   justify-content: center;
22   top: -1px;
23   right: -1px;
24   background-color: #EEE;
25   border: 1px solid #DDD;
26   border-radius: 0 4px 0 0;
27   @include lightDark(background-color, #eee, #333);
28   @include lightDark(border-color, #ddd, #444);
29   @include lightDark(color, #444, #888);
30   line-height: 0;
31   cursor: pointer;
32   z-index: 5;
33   user-select: none;
34   opacity: 0;
35   pointer-events: none;
36   width: 32px;
37   height: 32px;
38   transition: background-color linear 60ms, color linear 60ms;
39   svg {
40     fill: currentColor;
41   }
42   &.success {
43     background: $positive;
44     color: #FFF;
45   }
46   &:focus {
47     outline: 0 !important;
48   }
49 }
50 .cm-editor:hover .cm-copy-button  {
51   user-select: all;
52   opacity: .6;
53   pointer-events: all;
54 }