anki/ts/editor/fields.scss

110 lines
1.8 KiB
SCSS
Raw Normal View History

2019-02-05 04:59:03 +01:00
/* Copyright: Ankitects Pty Ltd and contributors
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
@use "sass/base";
@use "sass/scrollbar";
@use "sass/button-mixins";
2021-04-13 16:15:40 +02:00
html,
body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
2021-04-13 16:15:40 +02:00
.nightMode {
@include scrollbar.night-mode;
}
2021-01-26 23:15:11 +01:00
#fields {
display: flex;
flex-direction: column;
flex-grow: 1;
overflow-x: hidden;
margin: 3px 0;
}
.editorfield {
margin: 3px;
border-radius: 5px;
border: 1px solid var(--border-color);
--border-color: var(--border);
&:focus-within {
box-shadow: 0 0 0 3px var(--focus-shadow);
--border-color: var(--focus-border);
}
2021-01-26 23:15:11 +01:00
}
/* editing-area */
.field {
2021-07-21 01:32:09 +02:00
position: relative;
background: var(--frame-bg);
border-radius: 0 0 5px 5px;
&.dupe {
// this works around the background colour persisting in copy+paste
// (https://github.com/ankitects/anki/pull/1278)
background-image: linear-gradient(var(--flag1-bg), var(--flag1-bg));
}
}
.fname {
border-width: 0 0 1px;
border-style: dashed;
border-color: var(--border-color);
border-radius: 5px 5px 0 0;
padding: 0px 6px;
}
.fieldname {
user-select: none;
}
2021-06-12 17:35:40 +02:00
#dupes,
2021-06-14 10:21:42 +02:00
#cloze-hint {
position: sticky;
bottom: 0;
text-align: center;
background-color: var(--window-bg);
a {
color: var(--link);
}
}
2021-02-27 23:51:20 +01:00
2021-03-28 15:45:51 +02:00
.icon > svg {
fill: var(--text-fg);
}
.pin-icon {
cursor: pointer;
2021-03-28 15:45:51 +02:00
&.is-inactive {
opacity: 0.2;
}
2021-02-27 23:51:20 +01:00
2021-03-28 15:45:51 +02:00
&.icon--hover {
opacity: 0.5;
2021-02-27 23:51:20 +01:00
}
}
@import "codemirror/lib/codemirror";
@import "codemirror/theme/monokai";
@import "codemirror/addon/fold/foldgutter";
.CodeMirror {
height: auto;
border-radius: 0 0 5px 5px;
padding: 6px 0;
}