Skip to content

Commit 4535903

Browse files
committed
Re-organized some scss.
1 parent 76c7ad6 commit 4535903

File tree

2 files changed

+184
-181
lines changed

2 files changed

+184
-181
lines changed

scss/views/docView.scss

Lines changed: 161 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,169 @@
3838
}
3939
}
4040

41-
.icon-star {
42-
cursor: pointer;
43-
44-
&:before {
45-
font-family: $icon-font;
46-
-webkit-font-smoothing: antialiased;
47-
font-size: .9rem;
48-
padding: .1em;
49-
content: "\E050";
50-
}
51-
52-
&:hover {
53-
color: $white;
54-
}
55-
56-
&.small {
57-
&:before {
58-
font-size: .72rem;
41+
/* EXPR UI test */
42+
.title.expr {
43+
background: $theme-color;
44+
}
45+
.editor.expr {
46+
font-weight: bold;
47+
}
48+
49+
.expr .results {
50+
@extend %user-select-none;
51+
position: absolute;
52+
right: 0;
53+
font-size: 0.75rem;
54+
font-weight: bold;
55+
margin: 0.125rem;
56+
margin-right: ($pad);
57+
padding: 0.5rem;
58+
background: $theme-color;
59+
border-radius: 3px;
60+
cursor: default;
61+
z-index: $z-index-middle;
62+
63+
&.nomatch {
64+
background: $title-bg;
5965
}
60-
}
66+
&.error {
67+
background: $error-color;
68+
font-weight: bold;
69+
}
70+
}
6171

62-
&.empty {
63-
&:before {
64-
content: "\E049";
72+
/* SOURCE UI */
73+
.source .measure {
74+
position: absolute;
75+
top: $pad;
76+
bottom: $pad;
77+
left: $pad;
78+
right: $pad;
79+
visibility: hidden;
80+
}
81+
82+
.source .canvas {
83+
position: absolute;
84+
background: $editor-bg;
85+
}
86+
87+
/* SUBST UI */
88+
.title.subst {
89+
cursor: pointer;
90+
}
91+
92+
.title.subst:hover .button {
93+
color: $hover-color;
94+
}
95+
96+
.editor.substres {
97+
background: $editor-substres-bg;
98+
99+
.CodeMirror {
100+
color: lighten($color, 34%);
101+
}
102+
}
103+
104+
.editor.subst {
105+
font-weight: bold;
106+
border-bottom: dotted $subst-border $title-bg;
107+
}
108+
109+
.subst-disabled {
110+
.title.subst {
111+
color: lighten($color, 40%);
65112
}
66-
}
67113

68-
&.hover {
69-
color: $white;
70-
}
114+
.editor.subst, .editor.substres {
115+
display:none;
116+
}
117+
118+
.subst .button:before {
119+
content: attr(data-alticon);
120+
}
121+
}
122+
123+
.subst-disabled .editor.source {
124+
@include calc("height", "100% - #{3*$title-h-pad + 1*$editor-h-pad + 2*$pad}");
125+
}
126+
127+
.editor.source, .editor.substres {
128+
@include calc("height", "100%/2 - #{3*$title-h-pad + 2*$editor-h-pad + 4*$pad}/2 - #{$subst-border}");
129+
}
130+
131+
/* Syntax highlighting */
132+
.exp-decorator {
133+
color: #b9babf;
134+
font-weight: bold;
135+
}
136+
137+
.exp-related {
138+
border-bottom: solid 1px rgba(0, 0, 0, 0.22);
139+
border-top: solid 1px rgba(0, 0, 0, 0.22);
140+
margin-bottom: -1px;
141+
margin-top: -1px;
142+
}
143+
144+
.exp-related-left {
145+
border-left: solid 1px rgba(0, 0, 0, 0.22);
146+
margin-left: -1px;
147+
}
148+
149+
.exp-related-right {
150+
border-right: solid 1px rgba(0, 0, 0, 0.22);
151+
margin-right: -1px;
152+
}
153+
154+
.exp-selected {
155+
border-top: solid 2px rgba(0, 0, 0, 0.33);
156+
border-bottom: solid 2px rgba(0, 0, 0, 0.33);
157+
margin-bottom: -2px;
158+
margin-top: -2px;
159+
}
160+
161+
.exp-selected-left {
162+
border-left: solid 2px rgba(0, 0, 0, 0.33);
163+
margin-left: -2px;
164+
}
165+
166+
.exp-selected-right {
167+
border-right: solid 2px rgba(0, 0, 0, 0.33);
168+
margin-right: -2px;
169+
}
170+
171+
.exp-error {
172+
border-bottom: solid 2px $error-color;
173+
}
174+
175+
.exp-esc {
176+
color: #C0C;
177+
}
178+
179+
.exp-quant, .exp-lazy, .exp-alt {
180+
color: #35F;
181+
}
182+
183+
.exp-anchor {
184+
color: #930;
185+
}
186+
187+
.exp-group, .exp-backref, .exp-lookaround {
188+
color: #090;
189+
}
190+
191+
.exp-charclass, .exp-set, .exp-subst {
192+
color: #D70;
193+
}
194+
195+
.exp-group-0 { background: rgba(0, 250, 0, 0.13); }
196+
197+
.exp-group-1 { background: rgba(0, 235, 0, 0.23); }
198+
199+
.exp-group-2 { background: rgba(0, 220, 0, 0.32); }
200+
201+
.exp-group-3 { background: rgba(0, 205, 0, 0.40); }
202+
203+
.exp-group-set {
204+
background: rgba(255, 255, 0, 0.3);
71205
}
206+

scss/views/libView.scss

Lines changed: 23 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -100,168 +100,36 @@
100100
}
101101
}
102102

103-
/* EXPR UI test */
104-
.title.expr {
105-
background: $theme-color;
106-
}
107-
.editor.expr {
108-
font-weight: bold;
109-
}
110103

111-
.expr .results {
112-
@extend %user-select-none;
113-
position: absolute;
114-
right: 0;
115-
font-size: 0.75rem;
116-
font-weight: bold;
117-
margin: 0.125rem;
118-
margin-right: ($pad);
119-
padding: 0.5rem;
120-
background: $theme-color;
121-
border-radius: 3px;
122-
cursor: default;
123-
z-index: $z-index-middle;
104+
.icon-star {
105+
cursor: pointer;
124106

125-
&.nomatch {
126-
background: $title-bg;
127-
}
128-
&.error {
129-
background: $error-color;
130-
font-weight: bold;
131-
}
132-
}
107+
&:before {
108+
font-family: $icon-font;
109+
-webkit-font-smoothing: antialiased;
110+
font-size: .9rem;
111+
padding: .1em;
112+
content: "\E050";
113+
}
133114

134-
/* SOURCE UI */
135-
.source .measure {
136-
position: absolute;
137-
top: $pad;
138-
bottom: $pad;
139-
left: $pad;
140-
right: $pad;
141-
visibility: hidden;
142-
}
143-
144-
.source .canvas {
145-
position: absolute;
146-
background: $editor-bg;
147-
}
115+
&:hover {
116+
color: $white;
117+
}
148118

149-
/* SUBST UI */
150-
.title.subst {
151-
cursor: pointer;
152-
}
153-
154-
.title.subst:hover .button {
155-
color: $hover-color;
156-
}
157-
158-
.editor.substres {
159-
background: $editor-substres-bg;
160-
161-
.CodeMirror {
162-
color: lighten($color, 34%);
163-
}
164-
}
165-
166-
.editor.subst {
167-
font-weight: bold;
168-
border-bottom: dotted $subst-border $title-bg;
169-
}
170-
171-
.subst-disabled {
172-
.title.subst {
173-
color: lighten($color, 40%);
119+
&.small {
120+
&:before {
121+
font-size: .72rem;
174122
}
123+
}
175124

176-
.editor.subst, .editor.substres {
177-
display:none;
125+
&.empty {
126+
&:before {
127+
content: "\E049";
178128
}
129+
}
179130

180-
.subst .button:before {
181-
content: attr(data-alticon);
182-
}
183-
}
184-
185-
.subst-disabled .editor.source {
186-
@include calc("height", "100% - #{3*$title-h-pad + 1*$editor-h-pad + 2*$pad}");
187-
}
188-
189-
.editor.source, .editor.substres {
190-
@include calc("height", "100%/2 - #{3*$title-h-pad + 2*$editor-h-pad + 4*$pad}/2 - #{$subst-border}");
191-
}
192-
193-
/* Syntax highlighting */
194-
.exp-decorator {
195-
color: #b9babf;
196-
font-weight: bold;
131+
&.hover {
132+
color: $white;
133+
}
197134
}
198135

199-
.exp-related {
200-
border-bottom: solid 1px rgba(0, 0, 0, 0.22);
201-
border-top: solid 1px rgba(0, 0, 0, 0.22);
202-
margin-bottom: -1px;
203-
margin-top: -1px;
204-
}
205-
206-
.exp-related-left {
207-
border-left: solid 1px rgba(0, 0, 0, 0.22);
208-
margin-left: -1px;
209-
}
210-
211-
.exp-related-right {
212-
border-right: solid 1px rgba(0, 0, 0, 0.22);
213-
margin-right: -1px;
214-
}
215-
216-
.exp-selected {
217-
border-top: solid 2px rgba(0, 0, 0, 0.33);
218-
border-bottom: solid 2px rgba(0, 0, 0, 0.33);
219-
margin-bottom: -2px;
220-
margin-top: -2px;
221-
}
222-
223-
.exp-selected-left {
224-
border-left: solid 2px rgba(0, 0, 0, 0.33);
225-
margin-left: -2px;
226-
}
227-
228-
.exp-selected-right {
229-
border-right: solid 2px rgba(0, 0, 0, 0.33);
230-
margin-right: -2px;
231-
}
232-
233-
.exp-error {
234-
border-bottom: solid 2px $error-color;
235-
}
236-
237-
.exp-esc {
238-
color: #C0C;
239-
}
240-
241-
.exp-quant, .exp-lazy, .exp-alt {
242-
color: #35F;
243-
}
244-
245-
.exp-anchor {
246-
color: #930;
247-
}
248-
249-
.exp-group, .exp-backref, .exp-lookaround {
250-
color: #090;
251-
}
252-
253-
.exp-charclass, .exp-set, .exp-subst {
254-
color: #D70;
255-
}
256-
257-
.exp-group-0 { background: rgba(0, 250, 0, 0.13); }
258-
259-
.exp-group-1 { background: rgba(0, 235, 0, 0.23); }
260-
261-
.exp-group-2 { background: rgba(0, 220, 0, 0.32); }
262-
263-
.exp-group-3 { background: rgba(0, 205, 0, 0.40); }
264-
265-
.exp-group-set {
266-
background: rgba(255, 255, 0, 0.3);
267-
}

0 commit comments

Comments
 (0)