/
HistoryViewer.scss
186 lines (153 loc) · 3.26 KB
/
HistoryViewer.scss
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
.history-viewer {
td:first-child {
width: 1%;
}
> .panel--padded {
padding-top: 0;
}
}
.history-viewer__table:not(.history-viewer__table--current) tbody tr:hover {
cursor: pointer;
}
// Used in conjunction with .panel--padded, removes top and bottom padding
.panel--padded-side {
padding-bottom: 0;
padding-top: 0;
}
.history-viewer__form {
position: relative;
}
.history-viewer__version-state .badge {
margin-left: 10px;
}
.table .history-viewer__row--current {
// There will only be one table row in this table state
&, &:hover {
background-color: $link-color;
color: $white;
}
.text-muted {
color: $white !important;
}
}
.history-viewer__table--compare {
margin-left: 0;
margin-right: 0;
min-width: 100%;
}
.history-viewer__version-detail--compare {
margin-left: $panel-padding-x;
margin-right: $panel-padding-x;
}
// Table cell containing action buttons, e.g. compare and close
.table .history-viewer__actions {
padding: 0;
text-align: right;
width: 1%;
vertical-align: middle;
white-space: nowrap;
}
// Bring any CMS tabs in the detail view closer to the table above it
.history-viewer__version-detail .nav-tabs {
margin-top: -$panel-padding-y;
}
.history-viewer__compare-button {
border: 1px solid $white;
color: $white;
margin-right: 1rem;
}
.history-viewer__close-button {
background: transparent;
border: 1px solid $white;
border-radius: 50%; // circular
color: $white;
padding: .4rem .55rem;
&::before {
font-size: 1.4rem;
}
}
.history-viewer__messages .message-box {
&:first-child {
margin-top: $panel-padding-y;
}
&:last-child {
margin-bottom: 0;
}
}
// Todo: remove this when the CMS is React driven and we don't need this hack
.history-viewer__preview {
margin-top: -54px;
}
.history-viewer__toolbar--condensed {
min-width: 50%;
width: 50%;
}
.history-viewer__compare-notice {
align-self: center;
background-color: lighten($color-notice, 13%);
color: darken($color-notice, 35%);
border: 1px solid $color-notice;
border-top: none;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
&.fixed {
position: absolute;
}
.notice-message {
padding: .4rem 1rem .4rem 1.5rem;
vertical-align: middle;
}
button {
background-color: inherit;
color: inherit;
border-width: 0 0 0 1px;
border-color: $color-notice;
margin-right: 0;
border-radius: 0 0 5px 0;
&:hover {
background-color: lighten($color-notice, 18%);
}
}
}
.history-viewer__heading {
.author-compare-toggle__container {
display: flex;
.author-span {
align-self: flex-end;
}
.compare-dropdown {
margin-left: auto;
button {
&::before {
margin-right: 0;
}
}
&.show {
.dropdown-menu {
min-width: 14rem;
}
}
.form-check {
margin-top: .5rem;
}
}
.form-check-label {
text-transform: none;
}
}
}
.history-viewer__version-detail-diff {
del {
color: #f44;
}
ins {
background-color: #dfd;
text-decoration: none;
}
}
// Hide preview on small devices. @todo replace this with a view toggle component
@include media-breakpoint-down(md) {
.history-viewer__preview {
display: none;
}
}