Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 1 | @charset "utf-8"; |
| 2 | @import "util"; |
| 3 | |
| 4 | $left-padding: 28pt; // 2.8em; |
| 5 | $border-size: 2px; |
| 6 | |
| 7 | .vc { |
| 8 | background-color: $light-green; |
| 9 | margin-top: 10px; |
| 10 | .docGroup { |
| 11 | position: relative; |
| 12 | display: inline-block; |
| 13 | color: $nearly-white; |
| 14 | |
| 15 | margin-left: $left-padding; // 2.8em |
| 16 | |
| 17 | // .6em .5em |
| 18 | border-width: 0 (2 * $border-size); |
| 19 | |
| 20 | padding: { |
| 21 | top: 10pt; |
| 22 | bottom: 2pt; |
| 23 | left: 0pt; |
| 24 | right: 6pt; |
| 25 | } |
| 26 | |
| 27 | border: { |
| 28 | radius: $standard-border-radius * 2; |
| 29 | style: solid; |
| 30 | } |
| 31 | |
| 32 | .docGroup { |
| 33 | display: block; |
| 34 | } |
| 35 | |
| 36 | > .operators { |
| 37 | position: absolute; |
| 38 | display: block; |
| 39 | top: 10px; |
| 40 | vertical-align: middle; |
| 41 | left: 3px; |
| 42 | border-width: 2px 2px 2px 0; |
| 43 | border-top-right-radius: 7px; |
| 44 | border-bottom-right-radius: 7px; |
| 45 | margin-left: 100%; |
| 46 | padding: 0; |
| 47 | } |
| 48 | |
| 49 | &:hover { |
| 50 | background-color: rgba(255,255,255,.05); |
| 51 | } |
| 52 | |
| 53 | &[data-operation=or] { |
| 54 | border-color: $dark-orange; |
| 55 | > .doc::before, |
| 56 | > .docGroup::before { |
Nils Diewald | 2488d05 | 2015-04-09 21:46:02 +0000 | [diff] [blame^] | 57 | content: "or"; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 58 | } |
| 59 | > .operators { |
| 60 | border-color: $dark-orange; |
| 61 | background-color: $dark-orange; |
| 62 | color: $nearly-white; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | &[data-operation=and] { |
| 67 | > .doc::before, |
| 68 | > .docGroup::before { |
Nils Diewald | 2488d05 | 2015-04-09 21:46:02 +0000 | [diff] [blame^] | 69 | content: "and"; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 70 | } |
| 71 | } |
| 72 | |
| 73 | &[data-operation] { |
| 74 | > .doc:first-child::before, |
| 75 | > .docGroup:first-child::before { |
| 76 | content: ''; |
| 77 | } |
| 78 | > .doc::before, |
| 79 | > .docGroup::before { |
| 80 | display: inline-block; |
| 81 | text-align: right; |
| 82 | // width: 2.2em; |
| 83 | width: $left-padding; |
| 84 | color: $dark-green; |
| 85 | } |
| 86 | > .doc::before { |
| 87 | padding-right: 1.2em; |
| 88 | margin-right: .1em; |
| 89 | } |
| 90 | > .docGroup::before { |
| 91 | position: absolute; |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | .doc { |
| 97 | > span + span { |
| 98 | margin-left: 5pt; |
| 99 | } |
| 100 | > span.key, |
| 101 | > span.value { |
| 102 | font-weight: bold; |
| 103 | } |
| 104 | > .operators { |
| 105 | display: inline-block; |
| 106 | border-color: $dark-orange; |
| 107 | border-width: 2px 2px 2px 2px; |
| 108 | border-radius: 7px; |
| 109 | |
| 110 | margin-left: 10px; |
| 111 | > span { |
| 112 | &.and { |
| 113 | border: { |
| 114 | radius: inherit; |
| 115 | top-right-radius: 0; |
| 116 | bottom-right-radius: 0; |
| 117 | } |
| 118 | &.delete { |
| 119 | border: { |
| 120 | top-left-radius: 0; |
| 121 | bottom-left-radius: 0; |
| 122 | } |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | > span.key { |
| 128 | position: relative; |
| 129 | > ul { |
| 130 | margin: 0; |
| 131 | margin-left: 3.3em; |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | .rewritten { |
| 137 | .rewrite { |
| 138 | margin-left: 4pt; |
| 139 | display: inline-block; |
| 140 | color: $dark-orange; |
| 141 | &::after { |
| 142 | font-family: FontAwesome; |
| 143 | font-style: normal; |
| 144 | font-weight: normal; |
Nils Diewald | 2488d05 | 2015-04-09 21:46:02 +0000 | [diff] [blame^] | 145 | content: $fa-rewrite; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 146 | text-decoration: underline; |
| 147 | } |
| 148 | span { |
| 149 | display: none; |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | .operators { |
| 155 | opacity: 0; |
| 156 | white-space: nowrap; |
| 157 | padding: 0; |
| 158 | font-size: 0; |
| 159 | line-height: 0; |
| 160 | color: $light-green; |
| 161 | border-color: $nearly-white; |
| 162 | text-align: center; |
| 163 | font-weight: bold; |
| 164 | border-style: solid; |
| 165 | |
| 166 | > span { |
| 167 | cursor: pointer; |
| 168 | font-size: 9pt; |
| 169 | line-height: 1.3em; |
| 170 | padding: 0 4px; |
| 171 | display: inline-block; |
| 172 | &.and { |
| 173 | background-color: $nearly-white; |
| 174 | color: $light-green; |
| 175 | } |
| 176 | &.or { |
| 177 | background-color: $dark-orange; |
| 178 | color: $nearly-white; |
| 179 | } |
| 180 | &.delete { |
| 181 | background-color: red; |
| 182 | border-radius: inherit; |
| 183 | color: $nearly-white; |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | > .docGroup { |
| 189 | margin-left: 0; |
| 190 | } |
| 191 | |
| 192 | |
| 193 | .docGroup > .docGroup::before { |
| 194 | background-color: red; |
| 195 | margin-left: -1 * $left-padding; // -3.4em; |
| 196 | } |
| 197 | |
| 198 | .doc, .docGroup { |
| 199 | &:hover > .operators { |
| 200 | opacity: 1; |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | } |
| 205 | |
| 206 | |
| 207 | /* |
| 208 | .vc .docGroup[data-operation=and]::before, |
| 209 | .vc .docGroup[data-operation=and] .operators { |
| 210 | background-color: white; |
| 211 | } |
| 212 | */ |
| 213 | |
| 214 | $dg-index : 30; |
| 215 | |
| 216 | .docGroup { |
| 217 | > .operators { |
| 218 | z-index: $dg-index; |
| 219 | } |
| 220 | .docGroup { |
| 221 | > .operators { |
| 222 | z-index: $dg-index + 1; |
| 223 | } |
| 224 | .docGroup { |
| 225 | > .operators { |
| 226 | z-index: $dg-index + 2; |
| 227 | } |
| 228 | .docGroup { |
| 229 | > .operators { |
| 230 | z-index: $dg-index + 3; |
| 231 | } |
| 232 | .docGroup { |
| 233 | > .operators { |
| 234 | z-index: $dg-index + 4; |
| 235 | } |
| 236 | .docGroup { |
| 237 | > .operators { |
| 238 | z-index: $dg-index + 5; |
| 239 | } |
| 240 | .docGroup { |
| 241 | > .operators { |
| 242 | z-index: $dg-index + 6; |
| 243 | } |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | } |