You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

313 lines
5.6 KiB

  1. /*
  2. * # Semantic - Message
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2013 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'collection';
  15. @element : 'message';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Message
  19. *******************************/
  20. .ui.message {
  21. position: relative;
  22. min-height: 1em;
  23. margin: @verticalMargin 0em;
  24. background: @background;
  25. padding: @verticalPadding @horizontalPadding;
  26. line-height: @lineHeight;
  27. color: @textColor;
  28. transition: @transition;
  29. border-radius: @borderRadius;
  30. box-shadow: @boxShadow;
  31. }
  32. .ui.message:first-child {
  33. margin-top: 0em;
  34. }
  35. .ui.message:last-child {
  36. margin-bottom: 0em;
  37. }
  38. /*--------------
  39. Content
  40. ---------------*/
  41. /* block with headers */
  42. .ui.message .header {
  43. display: @headerDisplay;
  44. font-family: @headerFont;
  45. font-size: @headerFontSize;
  46. font-weight: @headerFontWeight;
  47. margin: 0em @headerHorizontalDistance 0em 0em;
  48. }
  49. /* block with paragraphs */
  50. .ui.message p {
  51. opacity: @messageTextOpacity;
  52. margin: @messageParagraphMargin 0em;
  53. }
  54. .ui.message p:first-child {
  55. margin-top: 0em;
  56. }
  57. .ui.message p:last-child {
  58. margin-bottom: 0em;
  59. }
  60. .ui.message .header + p {
  61. margin-top: @headerBottomMargin;
  62. }
  63. /* Block with list */
  64. .ui.message ul.list {
  65. opacity: @listOpacity;
  66. list-style-position: @listStylePosition;
  67. margin: @listMargin 0em 0em;
  68. padding: 0em;
  69. }
  70. .ui.message ul.list li {
  71. position: relative;
  72. list-style-type: none;
  73. margin: 0em 0em @listItemMargin @listItemIndent;
  74. padding: 0em;
  75. }
  76. .ui.message ul.list li:before {
  77. position: absolute;
  78. content: '•';
  79. left: -1em;
  80. height: 100%;
  81. vertical-align: baseline;
  82. }
  83. .ui.message ul.list li:first-child {
  84. margin-top: 0em;
  85. }
  86. /* Close Icon */
  87. .ui.message > .close.icon {
  88. cursor: pointer;
  89. position: absolute;
  90. top: @closeTopDistance;
  91. right: @closeRightDistance;
  92. opacity: @closeOpacity;
  93. transition:
  94. opacity 0.1s linear
  95. ;
  96. }
  97. .ui.message > .close.icon:hover {
  98. opacity: 1;
  99. }
  100. /* First / Last Element */
  101. .ui.message > :first-child {
  102. margin-top: 0em;
  103. }
  104. .ui.message > :last-child {
  105. margin-bottom: 0em;
  106. }
  107. /*******************************
  108. States
  109. *******************************/
  110. .ui.message.visible,
  111. .ui.header.visible {
  112. display: block !important;
  113. }
  114. .ui.message.hidden,
  115. .ui.header.hidden {
  116. display: none;
  117. }
  118. /*******************************
  119. Variations
  120. *******************************/
  121. /*--------------
  122. Compact
  123. ---------------*/
  124. .ui.compact.message {
  125. display: inline-block;
  126. }
  127. /*--------------
  128. Attached
  129. ---------------*/
  130. .ui.attached.message {
  131. margin-left: @attachedOffset;
  132. margin-right: @attachedOffset;
  133. margin-bottom: @attachedOffset;
  134. border-radius: @borderRadius @borderRadius 0em 0em;
  135. box-shadow:
  136. @attachedBoxShadow
  137. ;
  138. }
  139. .ui.attached + .ui.attached.message:not(.top):not(.bottom) {
  140. margin-top: @attachedOffset;
  141. border-radius: 0em;
  142. }
  143. .ui.bottom.attached.message {
  144. margin-top: @attachedOffset;
  145. border-radius: 0em 0em @borderRadius @borderRadius;
  146. }
  147. .ui.bottom.attached.message:not(:last-child) {
  148. margin-bottom: @verticalMargin;
  149. }
  150. .ui.attached.icon.message {
  151. display: block;
  152. width: auto;
  153. }
  154. /*--------------
  155. Icon
  156. ---------------*/
  157. .ui.icon.message {
  158. display: table;
  159. width: 100%;
  160. }
  161. .ui.icon.message > .icon:not(.close) {
  162. display: table-cell;
  163. vertical-align: @iconVerticalAlign;
  164. font-size: @iconSize;
  165. opacity: @iconOpacity;
  166. }
  167. .ui.icon.message > .icon + .content {
  168. padding-left: @iconDistance;
  169. }
  170. .ui.icon.message > .content {
  171. display: table-cell;
  172. vertical-align: @iconVerticalAlign;
  173. }
  174. /*--------------
  175. Floating
  176. ---------------*/
  177. .ui.floating.message {
  178. box-shadow: @floatingBoxShadow;
  179. }
  180. /*--------------
  181. Colors
  182. ---------------*/
  183. .ui.black.message {
  184. background-color: @black;
  185. color: @invertedTextColor;
  186. }
  187. /*--------------
  188. Types
  189. ---------------*/
  190. /* Inverted */
  191. .ui.inverted.message,
  192. .ui.black.message {
  193. background-color: @black;
  194. color: @invertedTextColor;
  195. }
  196. /* Positive / Negative */
  197. .ui.positive.message {
  198. background-color: @positiveBackgroundColor;
  199. color: @positiveTextColor;
  200. }
  201. .ui.negative.message {
  202. background-color: @negativeBackgroundColor;
  203. color: @negativeTextColor;
  204. }
  205. /* User Action */
  206. .ui.info.message {
  207. background-color: @infoBackgroundColor;
  208. color: @infoTextColor;
  209. }
  210. .ui.warning.message {
  211. background-color: @warningBackgroundColor;
  212. color: @warningTextColor;
  213. }
  214. .ui.error.message {
  215. background-color: @errorBackgroundColor;
  216. color: @errorTextColor;
  217. }
  218. .ui.success.message {
  219. background-color: @successBackgroundColor;
  220. color: @successTextColor;
  221. }
  222. /* Colors */
  223. .ui.blue.message {
  224. background-color: @blueBackground;
  225. color: @blueTextColor;
  226. }
  227. .ui.green.message {
  228. background-color: @greenBackground;
  229. color: @greenTextColor;
  230. }
  231. .ui.orange.message {
  232. background-color: @orangeBackground;
  233. color: @orangeTextColor;
  234. }
  235. .ui.pink.message {
  236. background-color: @pinkBackground;
  237. color: @pinkTextColor;
  238. }
  239. .ui.purple.message {
  240. background-color: @purpleBackground;
  241. color: @purpleTextColor;
  242. }
  243. .ui.red.message {
  244. background-color: @redBackground;
  245. color: @redTextColor;
  246. }
  247. .ui.teal.message {
  248. background-color: @tealBackground;
  249. color: @tealTextColor;
  250. }
  251. .ui.yellow.message {
  252. background-color: @yellowBackground;
  253. color: @yellowTextColor;
  254. }
  255. /*--------------
  256. Sizes
  257. ---------------*/
  258. .ui.small.message {
  259. font-size: @small;
  260. }
  261. .ui.message {
  262. font-size: @medium;
  263. }
  264. .ui.large.message {
  265. font-size: @large;
  266. }
  267. .ui.huge.message {
  268. font-size: @huge;
  269. }
  270. .ui.massive.message {
  271. font-size: @massive;
  272. }
  273. .loadUIOverrides();