Skip to content

Commit 2c34a2e

Browse files
committed
Add readonly-watermark styling
1 parent 4bb9a28 commit 2c34a2e

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

src/plugins/editor/components/editor.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
#swagger-editor {
23
#ace-editor {
34
height:~"calc(100vh - 46px)" !important;
@@ -7,3 +8,5 @@
78
height: ~"calc(100% - 46px)" !important;
89
}
910
}
11+
12+
@import './read-only-watermark.less';
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.editor-wrapper {
2+
3+
.editor-readonly-watermark {
4+
position: absolute;
5+
top: 0;
6+
height: 40px;
7+
left: 0;
8+
right: 0;
9+
padding-right: 20px;
10+
padding-top: 10px;
11+
margin: 0;
12+
13+
z-index: 2;
14+
color: #fff;
15+
font-weight: bold;
16+
text-align: right;
17+
user-select: none;
18+
pointer-events: none;
19+
20+
&:before {
21+
z-index: 1;
22+
pointer-events: none;
23+
position: absolute;
24+
content: ' ';
25+
top: 0;
26+
left: 0;
27+
right: 0;
28+
bottom: 0;
29+
30+
background: linear-gradient(
31+
to right,
32+
rgba(255,255,255,0) 60%,
33+
rgba(145, 145, 145, 0.31) 74%,
34+
rgba(255, 255, 255, 0.17) 100%);
35+
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)