github.com/fanux/shipyard@v0.0.0-20161009071005-6515ce223235/controller/static/semantic/src/definitions/collections/message.less (about) 1 /*! 2 * # Semantic UI - Message 3 * http://github.com/semantic-org/semantic-ui/ 4 * 5 * 6 * Copyright 2014 Contributors 7 * Released under the MIT license 8 * http://opensource.org/licenses/MIT 9 * 10 */ 11 12 /******************************* 13 Theme 14 *******************************/ 15 16 @type : 'collection'; 17 @element : 'message'; 18 19 @import (multiple) '../../theme.config'; 20 21 /******************************* 22 Message 23 *******************************/ 24 25 .ui.message { 26 position: relative; 27 min-height: 1em; 28 margin: @verticalMargin 0em; 29 background: @background; 30 padding: @verticalPadding @horizontalPadding; 31 line-height: @lineHeight; 32 color: @textColor; 33 transition: @transition; 34 border-radius: @borderRadius; 35 box-shadow: @boxShadow; 36 } 37 38 .ui.message:first-child { 39 margin-top: 0em; 40 } 41 .ui.message:last-child { 42 margin-bottom: 0em; 43 } 44 45 46 /*-------------- 47 Content 48 ---------------*/ 49 50 /* Header */ 51 .ui.message .header { 52 display: @headerDisplay; 53 font-family: @headerFont; 54 font-weight: @headerFontWeight; 55 margin: 0em 0em @headerDistance 0em; 56 } 57 58 /* Default font size */ 59 .ui.message .header:not(.ui) { 60 font-size: @headerFontSize; 61 } 62 63 /* Paragraph */ 64 .ui.message p { 65 opacity: @messageTextOpacity; 66 margin: @messageParagraphMargin 0em; 67 } 68 .ui.message p:first-child { 69 margin-top: 0em; 70 } 71 .ui.message p:last-child { 72 margin-bottom: 0em; 73 } 74 .ui.message .header + p { 75 margin-top: @headerParagraphDistance; 76 } 77 78 /* List */ 79 .ui.message ul.list { 80 opacity: @listOpacity; 81 list-style-position: @listStylePosition; 82 margin: @listMargin 0em 0em; 83 padding: 0em; 84 } 85 .ui.message ul.list:first-child { 86 margin-top: 0em; 87 } 88 .ui.message ul.list:last-child { 89 margin-bottom: 0em; 90 } 91 .ui.message ul.list li { 92 position: relative; 93 list-style-type: none; 94 margin: 0em 0em @listItemMargin @listItemIndent; 95 padding: 0em; 96 } 97 .ui.message ul.list li:before { 98 position: absolute; 99 content: '•'; 100 left: -1em; 101 height: 100%; 102 vertical-align: baseline; 103 } 104 .ui.message ul.list li:last-child { 105 margin-bottom: 0em; 106 } 107 108 109 /* Icon */ 110 .ui.message > .icon { 111 margin-right: @iconDistance; 112 } 113 114 /* Close Icon */ 115 .ui.message > .close.icon { 116 cursor: pointer; 117 position: absolute; 118 margin: 0em; 119 top: @closeTopDistance; 120 right: @closeRightDistance; 121 opacity: @closeOpacity; 122 transition: 123 opacity 0.1s linear 124 ; 125 } 126 .ui.message > .close.icon:hover { 127 opacity: 1; 128 } 129 130 /* First / Last Element */ 131 .ui.message > :first-child { 132 margin-top: 0em; 133 } 134 .ui.message > :last-child { 135 margin-bottom: 0em; 136 } 137 138 139 /******************************* 140 States 141 *******************************/ 142 143 /*-------------- 144 Visible 145 ---------------*/ 146 147 .ui.visible.visible.visible.visible.message { 148 display: block; 149 } 150 151 .ui.icon.visible.visible.visible.visible.message { 152 display: table; 153 } 154 155 /*-------------- 156 Hidden 157 ---------------*/ 158 159 .ui.hidden.hidden.hidden.hidden.message { 160 display: none; 161 } 162 163 /******************************* 164 Variations 165 *******************************/ 166 167 /*-------------- 168 Compact 169 ---------------*/ 170 171 .ui.compact.message { 172 display: inline-block; 173 } 174 175 176 /*-------------- 177 Attached 178 ---------------*/ 179 180 .ui.attached.message { 181 margin-bottom: @attachedYOffset; 182 border-radius: @borderRadius @borderRadius 0em 0em; 183 box-shadow: @attachedBoxShadow; 184 margin-left: @attachedXOffset; 185 margin-right: @attachedXOffset; 186 } 187 .ui.attached + .ui.attached.message:not(.top):not(.bottom) { 188 margin-top: @attachedYOffset; 189 border-radius: 0em; 190 } 191 .ui.bottom.attached.message { 192 margin-top: @attachedYOffset; 193 border-radius: 0em 0em @borderRadius @borderRadius; 194 box-shadow: @attachedBottomBoxShadow; 195 } 196 .ui.bottom.attached.message:not(:last-child) { 197 margin-bottom: @verticalMargin; 198 } 199 .ui.attached.icon.message { 200 display: block; 201 width: auto; 202 } 203 204 205 /*-------------- 206 Icon 207 ---------------*/ 208 209 .ui.icon.message { 210 display: table; 211 width: 100%; 212 } 213 .ui.icon.message > .icon:not(.close) { 214 display: table-cell; 215 width: auto; 216 vertical-align: @iconVerticalAlign; 217 font-size: @iconSize; 218 opacity: @iconOpacity; 219 } 220 .ui.icon.message > .content { 221 display: table-cell; 222 width: 100%; 223 vertical-align: @iconVerticalAlign; 224 } 225 226 227 .ui.icon.message .icon:not(.close) + .content { 228 padding-left: @iconContentDistance; 229 } 230 .ui.icon.message .circular.icon { 231 width: 1em; 232 } 233 .ui.icon.message .circular.icon + .content { 234 width: auto; 235 padding-left: @circularIconContentDistance; 236 } 237 238 /*-------------- 239 Floating 240 ---------------*/ 241 242 .ui.floating.message { 243 box-shadow: @floatingBoxShadow; 244 } 245 246 247 /*-------------- 248 Colors 249 ---------------*/ 250 251 .ui.black.message { 252 background-color: @black; 253 color: @invertedTextColor; 254 } 255 256 /*-------------- 257 Types 258 ---------------*/ 259 260 /* Positive */ 261 .ui.positive.message { 262 background-color: @positiveBackgroundColor; 263 color: @positiveTextColor; 264 } 265 .ui.positive.message, 266 .ui.attached.positive.message { 267 box-shadow: 268 0px 0px 0px 1px @positiveBorderColor inset, 269 @subtleShadow 270 ; 271 } 272 .ui.positive.message .header { 273 color: @positiveHeaderColor; 274 } 275 276 /* Negative */ 277 .ui.negative.message { 278 background-color: @negativeBackgroundColor; 279 color: @negativeTextColor; 280 } 281 .ui.negative.message, 282 .ui.attached.negative.message { 283 box-shadow: 284 0px 0px 0px 1px @negativeBorderColor inset, 285 @subtleShadow 286 ; 287 } 288 .ui.negative.message .header { 289 color: @negativeHeaderColor; 290 } 291 292 /* Info */ 293 .ui.info.message { 294 background-color: @infoBackgroundColor; 295 color: @infoTextColor; 296 } 297 .ui.info.message, 298 .ui.attached.info.message { 299 box-shadow: 300 0px 0px 0px 1px @infoBorderColor inset, 301 @subtleShadow 302 ; 303 } 304 .ui.info.message .header { 305 color: @infoHeaderColor; 306 } 307 308 /* Warning */ 309 .ui.warning.message { 310 background-color: @warningBackgroundColor; 311 color: @warningTextColor; 312 } 313 .ui.warning.message, 314 .ui.attached.warning.message { 315 box-shadow: 316 0px 0px 0px 1px @warningBorderColor inset, 317 @subtleShadow 318 ; 319 } 320 .ui.warning.message .header { 321 color: @warningHeaderColor; 322 } 323 324 /* Error */ 325 .ui.error.message { 326 background-color: @errorBackgroundColor; 327 color: @errorTextColor; 328 } 329 .ui.error.message, 330 .ui.attached.error.message { 331 box-shadow: 332 0px 0px 0px 1px @errorBorderColor inset, 333 @subtleShadow 334 ; 335 } 336 .ui.error.message .header { 337 color: @errorHeaderColor; 338 } 339 340 /* Success */ 341 .ui.success.message { 342 background-color: @successBackgroundColor; 343 color: @successTextColor; 344 } 345 .ui.success.message, 346 .ui.attached.success.message { 347 box-shadow: 348 0px 0px 0px 1px @successBorderColor inset, 349 @subtleShadow 350 ; 351 } 352 .ui.success.message .header { 353 color: @successHeaderColor; 354 } 355 356 357 /* Colors */ 358 .ui.inverted.message, 359 .ui.black.message { 360 background-color: @black; 361 color: @invertedTextColor; 362 } 363 364 .ui.blue.message { 365 background-color: @blueBackground; 366 color: @blueTextColor; 367 } 368 .ui.blue.message .header { 369 color: @blueHeaderColor; 370 } 371 .ui.green.message { 372 background-color: @greenBackground; 373 color: @greenTextColor; 374 } 375 .ui.green.message .header { 376 color: @greenHeaderColor; 377 } 378 .ui.orange.message { 379 background-color: @orangeBackground; 380 color: @orangeTextColor; 381 } 382 .ui.orange.message .header { 383 color: @orangeHeaderColor; 384 } 385 .ui.pink.message { 386 background-color: @pinkBackground; 387 color: @pinkTextColor; 388 } 389 .ui.pink.message .header { 390 color: @pinkHeaderColor; 391 } 392 .ui.purple.message { 393 background-color: @purpleBackground; 394 color: @purpleTextColor; 395 } 396 .ui.purple.message .header { 397 color: @purpleHeaderColor; 398 } 399 .ui.red.message { 400 background-color: @redBackground; 401 color: @redTextColor; 402 } 403 .ui.red.message .header { 404 color: @redHeaderColor; 405 } 406 .ui.teal.message { 407 background-color: @tealBackground; 408 color: @tealTextColor; 409 } 410 .ui.teal.message .header { 411 color: @tealHeaderColor; 412 } 413 .ui.yellow.message { 414 background-color: @yellowBackground; 415 color: @yellowTextColor; 416 } 417 .ui.yellow.message .header { 418 color: @yellowHeaderColor; 419 } 420 421 422 /*-------------- 423 Sizes 424 ---------------*/ 425 426 .ui.small.message { 427 font-size: @relativeSmall; 428 } 429 .ui.message { 430 font-size: @relativeMedium; 431 } 432 .ui.large.message { 433 font-size: @relativeLarge; 434 } 435 .ui.huge.message { 436 font-size: @relativeHuge; 437 } 438 .ui.massive.message { 439 font-size: @relativeMassive; 440 } 441 442 .loadUIOverrides();