-
Notifications
You must be signed in to change notification settings - Fork 33
/
style.less
105 lines (97 loc) · 2.36 KB
/
style.less
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
@prefix: redoc-try-;
/* Set the position of swaggerBox with body as the relative element */
body {
position: relative;
}
.@{prefix} {
&modal-box {
background-color: #ccc;
visibility: hidden;
height: initial;
left: initial;
top: initial;
width: initial;
&::before {
content: 'modal-box';
visibility: visible;
position: absolute;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
left: 0;
top: 0;
font-size: 0;
}
}
&modal-relative {
position: relative;
visibility: visible;
}
}
.swaggerBox.hide {
visibility: hidden;
cursor: none;
width: 0;
height: 0;
}
.swaggerBox.show {
visibility: visible;
cursor: initial;
}
/* Reset the style of swagger-ui */
.swaggerBox .swagger-ui .wrapper {
padding: 0;
}
.swaggerBox .swagger-ui .download-contents {
top: -10px;
right: 0;
width: initial;
}
/* Disable api bar to avoid problems */
.swaggerBox:not(.@{prefix}modal-box) .swagger-ui .opblock .opblock-summary {
cursor: not-allowed;
pointer-events: none;
}
/* Disable the api bar, but exclude the authorization button */
.swaggerBox .swagger-ui .authorization__btn {
cursor: initial;
pointer-events: initial;
}
.swaggerBox {
border-radius: 4px;
background-color: #fff;
width: 100%;
height: 100vh;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.swaggerBox:not(.@{prefix}modal-box) {
overflow: hidden;
}
/* Hide some disturbing elements */
.swaggerBox.pure:not(.@{prefix}modal-box) .swagger-ui .opblock-summary {
visibility: hidden;
padding: 0;
}
.swaggerBox.pure:not(.@{prefix}modal-box) .opblock-section thead,
.swaggerBox.pure:not(.@{prefix}modal-box) .swagger-ui .opblock-summary * {
display: none;
}
.swaggerBox:not(.@{prefix}modal-box) .swagger-ui .opblock .opblock-section-header,
.swaggerBox:not(.@{prefix}modal-box) .btn.cancel,
.swaggerBox:not(.@{prefix}modal-box) .try-out,
.swaggerBox:not(.@{prefix}modal-box) .responses-inner>div>h4,
.swaggerBox:not(.@{prefix}modal-box) :not(.live-responses-table).responses-table,
.swaggerBox:not(.@{prefix}modal-box) .opblock-body > .opblock-description-wrapper {
display: none;
}
.swaggerBox:not(.@{prefix}modal-box) .block div>span:last-child .operation-tag-content>span:last-child {
display: block;
margin-bottom: 100vh;
}
.swaggerBox .tryBtn {
margin-right: 10px;
background-color: #fff;
}