_common.scss (7025B)
1 /* 2 Copyright 2015, 2016 OpenMarket Ltd 3 Copyright 2017 Vector Creations Ltd 4 Copyright 2017 MTRNord <info@nordgedanken.de> 5 6 Licensed under the Apache License, Version 2.0 (the "License"); 7 you may not use this file except in compliance with the License. 8 You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 See the License for the specific language governing permissions and 16 limitations under the License. 17 */ 18 19 html { 20 /* hack to stop overscroll bounce on OSX and iOS. 21 N.B. Breaks things when we have legitimate horizontal overscroll */ 22 height: 100%; 23 overflow: hidden; 24 } 25 26 body { 27 /* Open Sans lacks combining diacritics, so these will fall through 28 to the next font. Helevetica's diacritics however do not combine 29 nicely with Open Sans (on OSX, at least) and result in a huge 30 horizontal mess. Arial empirically gets it right, hence prioritising 31 Arial here. */ 32 font-family: 'Open Sans', Arial, Helvetica, Sans-Serif; 33 font-size: 15px; 34 background-color: $primary-bg-color; 35 color: $primary-fg-color; 36 border: 0px; 37 margin: 0px; 38 /* This should render the fonts the same accross browsers */ 39 -webkit-font-smoothing: subpixel-antialiased; 40 } 41 42 div.error { 43 color: red; 44 } 45 46 h2 { 47 color: $primary-fg-color; 48 font-weight: 400; 49 font-size: 18px; 50 margin-top: 16px; 51 margin-bottom: 16px; 52 } 53 54 a:hover, 55 a:link, 56 a:visited { 57 color: $accent-color; 58 } 59 60 input[type=text], input[type=password], textarea { 61 background-color: transparent; 62 color: $primary-fg-color; 63 } 64 65 input[type=text].error, input[type=password].error { 66 border: 1px solid $warning-color; 67 } 68 69 input[type=text]:focus, input[type=password]:focus, textarea:focus { 70 border: 1px solid $accent-color; 71 outline: none; 72 box-shadow: none; 73 } 74 75 /* Required by Firefox */ 76 textarea { 77 font-family: 'Open Sans', Arial, Helvetica, Sans-Serif; 78 } 79 80 /* Prevent ugly dotted highlight around selected elements in Firefox */ 81 ::-moz-focus-inner { 82 border: 0; 83 } 84 85 /* applied to side-panels and messagepanel when in RoomSettings */ 86 .mx_fadable { 87 opacity: 1; 88 transition: opacity 0.2s ease-in-out; 89 } 90 91 /* XXX: critical hack to GeminiScrollbar to allow them to work in FF 42 and Chrome 48. 92 Stop the scrollbar view from pushing out the container's overall sizing, which causes 93 flexbox to adapt to the new size and cause the view to keep growing. 94 */ 95 .gm-scrollbar-container .gm-scroll-view { 96 position: absolute; 97 z-index: 1; 98 } 99 100 /* Expand thumbs on hoverover */ 101 .gm-scrollbar { 102 border-radius: 5px ! important; 103 } 104 .gm-scrollbar.-vertical { 105 width: 6px; 106 transition: width 120ms ease-out ! important; 107 } 108 .gm-scrollbar.-vertical:hover, 109 .gm-scrollbar.-vertical:active { 110 width: 8px; 111 transition: width 120ms ease-out ! important; 112 } 113 .gm-scrollbar.-horizontal { 114 height: 6px; 115 transition: height 120ms ease-out ! important; 116 } 117 .gm-scrollbar.-horizontal:hover, 118 .gm-scrollbar.-horizontal:active { 119 height: 8px; 120 transition: height 120ms ease-out ! important; 121 } 122 123 .mx_Dialog_wrapper { 124 position: fixed; 125 z-index: 4000; 126 top: 0; 127 left: 0; 128 width: 100%; 129 height: 100%; 130 131 display: flex; 132 align-items: center; 133 justify-content: center; 134 } 135 136 .mx_Dialog_wrapper .mx_Dialog { 137 border-radius: 5px; 138 box-shadow: 1px 4px 10px 6px rgba(0, 0, 0, 0.1); 139 } 140 141 /* Spinner Dialog overide */ 142 .mx_Dialog_wrapper.mx_Dialog_spinner .mx_Dialog { 143 width: auto; 144 border-radius: 8px; 145 padding: 0px; 146 box-shadow: none; 147 } 148 149 /* View Source Dialog overide */ 150 .mx_Dialog_wrapper.mx_Dialog_viewsource .mx_Dialog { 151 padding-left: 10px; 152 padding-right: 10px; 153 } 154 155 .mx_Dialog { 156 background-color: $primary-bg-color; 157 color: $light-fg-color; 158 z-index: 4010; 159 font-weight: 300; 160 font-size: 15px; 161 position: relative; 162 padding-left: 58px; 163 padding-bottom: 36px; 164 width: 60%; 165 max-width: 704px; 166 box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2); 167 max-height: 80%; 168 overflow-y: auto; 169 } 170 171 .mx_Dialog_background { 172 position: fixed; 173 top: 0; 174 left: 0; 175 width: 100%; 176 height: 100%; 177 background-color: $dialog-background-bg-color; 178 opacity: 0.8; 179 } 180 181 .mx_Dialog_lightbox .mx_Dialog_background { 182 opacity: 0.85; 183 background-color: $lightbox-background-bg-color; 184 } 185 186 .mx_Dialog_lightbox .mx_Dialog { 187 border-radius: 0px; 188 background-color: transparent; 189 width: 100%; 190 height: 100%; 191 max-width: 100%; 192 max-height: 100%; 193 pointer-events: none; 194 } 195 196 .mx_Dialog_cancelButton { 197 position: absolute; 198 right: 11px; 199 top: 13px; 200 cursor: pointer; 201 } 202 203 .mx_Dialog_cancelButton object { 204 pointer-events: none; 205 } 206 207 .mx_Dialog_content { 208 margin: 24px 58px 68px 0; 209 font-size: 14px; 210 color: $primary-fg-color; 211 word-wrap: break-word; 212 } 213 214 .mx_Dialog button, .mx_Dialog input[type="submit"] { 215 border: 0px; 216 height: 36px; 217 border-radius: 40px; 218 border: solid 1px $accent-color; 219 font-weight: 600; 220 font-size: 14px; 221 font-family: 'Open Sans', Arial, Helvetica, Sans-Serif; 222 margin-left: 0px; 223 margin-right: 8px; 224 padding-left: 1.5em; 225 padding-right: 1.5em; 226 outline: none; 227 cursor: pointer; 228 color: $accent-color; 229 background-color: $primary-bg-color; 230 231 /* align images in buttons (eg spinners) */ 232 vertical-align: middle; 233 } 234 235 .mx_Dialog button:focus, .mx_Dialog input[type="submit"]:focus { 236 filter: brightness($focus-brightness); 237 } 238 239 .mx_Dialog button.mx_Dialog_primary, .mx_Dialog input[type="submit"].mx_Dialog_primary { 240 color: $accent-fg-color; 241 background-color: $accent-color; 242 } 243 244 .mx_Dialog button.danger, .mx_Dialog input[type="submit"].danger { 245 background-color: $warning-color; 246 border: solid 1px $warning-color; 247 } 248 249 .mx_Dialog button:disabled, .mx_Dialog input[type="submit"]:disabled { 250 background-color: $light-fg-color; 251 border: solid 1px $light-fg-color; 252 opacity: 0.7; 253 } 254 255 .mx_Dialog_title { 256 min-height: 16px; 257 padding-top: 40px; 258 font-weight: bold; 259 font-size: 22px; 260 line-height: 1.4; 261 color: $primary-fg-color; 262 } 263 264 .mx_Dialog_title.danger { 265 color: $warning-color; 266 } 267 268 .mx_TextInputDialog_label { 269 text-align: left; 270 padding-bottom: 12px; 271 } 272 273 .mx_TextInputDialog_input { 274 font-size: 15px; 275 border-radius: 3px; 276 border: 1px solid $input-border-color; 277 padding: 9px; 278 color: $primary-fg-color; 279 background-color: $primary-bg-color; 280 box-shadow: inset 2px 2px 4px 1px rgba(0,0,0,.1); 281 } 282 283 .mx_emojione { 284 height: 1em; 285 vertical-align: middle; 286 } 287 288 ::-moz-selection { 289 background-color: $accent-color; 290 color: $selection-fg-color; 291 } 292 293 ::selection { 294 background-color: $accent-color; 295 color: $selection-fg-color; 296 } 297 298 /** green button with rounded corners */ 299 .mx_textButton { 300 color: $accent-fg-color; 301 background-color: $accent-color; 302 border-radius: 17px; 303 text-align: center; 304 padding-left: 1em; 305 padding-right: 1em; 306 cursor: pointer; 307 display: inline; 308 } 309 310 .mx_button_row { 311 margin-top: 69px; 312 } 313 314 .changelog_text { 315 font-family: 'Open Sans', Arial, Helvetica, Sans-Serif; 316 }