aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/css/index.css
blob: 3764dac7732403a5919ed2908f2bdc6a8ba23927 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
:root {
  --content-border: solid lightgray 2px;
  --content-border-radius: 5px;
}

body {
  display: flex;
  justify-items: stretch;
  width: 100%;
}

.result-html {
  flex: 0 0 50%;
  border: var(--content-border);
  border-radius: var(--content-border-radius);
  margin: 10px;
}

.editor {
  flex: 0 0 50%;
  max-width: 50vw;
  height: calc(100vh - 15px);
  margin: 10px;
}

.EasyMDEContainer {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 20px);
  box-sizing: border-box;

  .CodeMirror {
    order: 1;
    flex-grow: 1;
    border: var(--content-border);
    border-radius: var(--content-border-radius);
    padding-inline: 0;

    span {
      white-space: pre;
    }
    .invalid-input {
      text-decoration: red wavy underline 1px;
    }
  }

  .editor-toolbar {
    order: 2;
    margin-top: 0.5rem;
    border-left: 1px solid #ced4da;
    border-right: 1px solid #ced4da;
    border-bottom: 1px solid #ced4da;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  .editor-statusbar {
    order: 3;
  }
}

/* FIXME For those empty line (no child with cm-comment) */
.CodeMirror-line:has(.cm-comment) {
  background: rgba(0,0,0,.05) !important;

  .cm-comment {
    background: none !important;
  }
}

.container__suggestions {
  display: none;
  position: absolute;
  width: fit-content;
  min-width: 10rem;
  max-height: 40vh;
  overflow-y: scroll;
  border: 2px solid lightgray;
  border-radius: 0.5rem;
  z-index: 100;

  background: #fff;
}
.container__suggestion {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  overflow: hidden;

  height: fit-content;
  min-height: 2rem;
  white-space: nowrap;
  align-items: center;

  &:not(:first-child) {
    border-top: 1px solid rgb(203 213 225);
  }
  &.focus {
    background: rgb(226 232 240);
  }

  * {
    flex-shrink: 0;
    display: inline-block;
    overflow: hidden;
    padding-inline: 1em;
  }
  .info {
    color: #4682B4;
    font-weight: bold;
  }
  .truncate {
    flex-shrink: 1;
    text-overflow: ellipsis;
    ::before {
      width: 2rem
    }
  }
}