2020-04-10 23:38:29 +02:00
|
|
|
/**
|
2023-04-16 17:05:16 +02:00
|
|
|
* Custom CodeMirror BookStack overrides
|
2020-04-10 23:38:29 +02:00
|
|
|
*/
|
|
|
|
|
2023-04-16 17:05:16 +02:00
|
|
|
.cm-editor {
|
2017-05-28 14:16:21 +02:00
|
|
|
font-size: 12px;
|
2023-04-18 14:41:28 +02:00
|
|
|
border: 1px solid #ddd;
|
2023-04-16 17:05:16 +02:00
|
|
|
line-height: 1.4;
|
2023-04-18 16:08:17 +02:00
|
|
|
margin-bottom: $-l;
|
2023-04-18 15:21:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.page-content .cm-editor,
|
|
|
|
.CodeMirrorContainer .cm-editor {
|
2023-04-16 17:05:16 +02:00
|
|
|
border-radius: 4px;
|
2018-06-09 11:41:01 +02:00
|
|
|
}
|
|
|
|
|
2023-04-18 14:41:28 +02:00
|
|
|
// Manual dark-mode definition so that it applies to code blocks within the shadow
|
|
|
|
// dom which are used within the WYSIWYG editor, as the .dark-mode on the parent
|
|
|
|
// <html> node are not applies so instead we have the class on the parent element.
|
|
|
|
.dark-mode .cm-editor {
|
|
|
|
border-color: #444;
|
|
|
|
}
|
|
|
|
|
2018-06-09 11:41:01 +02:00
|
|
|
/**
|
|
|
|
* Custom Copy Button
|
|
|
|
*/
|
2023-04-14 15:08:40 +02:00
|
|
|
.cm-copy-button {
|
2018-06-09 11:41:01 +02:00
|
|
|
position: absolute;
|
2023-04-16 17:05:16 +02:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2018-06-09 11:41:01 +02:00
|
|
|
top: -1px;
|
|
|
|
right: -1px;
|
|
|
|
background-color: #EEE;
|
2020-04-10 23:38:29 +02:00
|
|
|
border: 1px solid #DDD;
|
2023-04-16 17:05:16 +02:00
|
|
|
border-radius: 0 4px 0 0;
|
2020-04-10 23:38:29 +02:00
|
|
|
@include lightDark(background-color, #eee, #333);
|
|
|
|
@include lightDark(border-color, #ddd, #444);
|
2023-04-16 17:05:16 +02:00
|
|
|
@include lightDark(color, #444, #888);
|
2018-06-09 11:41:01 +02:00
|
|
|
line-height: 0;
|
|
|
|
cursor: pointer;
|
|
|
|
z-index: 5;
|
|
|
|
user-select: none;
|
2018-09-22 15:55:33 +02:00
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
2023-04-16 17:05:16 +02:00
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
transition: background-color linear 60ms, color linear 60ms;
|
2018-06-09 11:41:01 +02:00
|
|
|
svg {
|
2023-04-16 17:05:16 +02:00
|
|
|
fill: currentColor;
|
2018-06-09 11:41:01 +02:00
|
|
|
}
|
|
|
|
&.success {
|
2023-04-16 17:05:16 +02:00
|
|
|
background: $positive;
|
|
|
|
color: #FFF;
|
|
|
|
}
|
|
|
|
&:focus {
|
|
|
|
outline: 0 !important;
|
2018-06-09 11:41:01 +02:00
|
|
|
}
|
|
|
|
}
|
2023-04-14 15:08:40 +02:00
|
|
|
.cm-editor:hover .cm-copy-button {
|
2018-06-09 11:41:01 +02:00
|
|
|
user-select: all;
|
2023-04-16 17:05:16 +02:00
|
|
|
opacity: .6;
|
2018-09-22 15:55:33 +02:00
|
|
|
pointer-events: all;
|
2017-05-28 17:02:46 +02:00
|
|
|
}
|