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.

365 lines
6.6 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. /*
  2. * # Semantic - Message
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributor
  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. /* Header */
  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. /* Paragraph */
  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. /* 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. /* Icon */
  87. .ui.message .icon {
  88. margin-right: @iconDistance;
  89. }
  90. /* Close Icon */
  91. .ui.message > .close.icon {
  92. cursor: pointer;
  93. position: absolute;
  94. top: @closeTopDistance;
  95. right: @closeRightDistance;
  96. opacity: @closeOpacity;
  97. transition:
  98. opacity 0.1s linear
  99. ;
  100. }
  101. .ui.message > .close.icon:hover {
  102. opacity: 1;
  103. }
  104. /* First / Last Element */
  105. .ui.message > :first-child {
  106. margin-top: 0em;
  107. }
  108. .ui.message > :last-child {
  109. margin-bottom: 0em;
  110. }
  111. /*******************************
  112. States
  113. *******************************/
  114. .ui.message.visible,
  115. .ui.header.visible {
  116. display: block !important;
  117. }
  118. .ui.message.hidden,
  119. .ui.header.hidden {
  120. display: none;
  121. }
  122. /*******************************
  123. Variations
  124. *******************************/
  125. /*--------------
  126. Compact
  127. ---------------*/
  128. .ui.compact.message {
  129. display: inline-block;
  130. }
  131. /*--------------
  132. Attached
  133. ---------------*/
  134. .ui.attached.message {
  135. margin-left: @attachedOffset;
  136. margin-right: @attachedOffset;
  137. margin-bottom: @attachedOffset;
  138. border-radius: @borderRadius @borderRadius 0em 0em;
  139. box-shadow:
  140. @attachedBoxShadow
  141. ;
  142. }
  143. .ui.attached + .ui.attached.message:not(.top):not(.bottom) {
  144. margin-top: @attachedOffset;
  145. border-radius: 0em;
  146. }
  147. .ui.bottom.attached.message {
  148. margin-top: @attachedOffset;
  149. border-radius: 0em 0em @borderRadius @borderRadius;
  150. box-shadow: @attachedBottomBoxShadow;
  151. }
  152. .ui.bottom.attached.message:not(:last-child) {
  153. margin-bottom: @verticalMargin;
  154. }
  155. .ui.attached.icon.message {
  156. display: block;
  157. width: auto;
  158. }
  159. /*--------------
  160. Icon
  161. ---------------*/
  162. .ui.icon.message {
  163. display: table;
  164. width: 100%;
  165. }
  166. .ui.icon.message > .icon:not(.close) {
  167. display: table-cell;
  168. vertical-align: @iconVerticalAlign;
  169. font-size: @iconSize;
  170. opacity: @iconOpacity;
  171. }
  172. .ui.icon.message > .content {
  173. display: table-cell;
  174. vertical-align: @iconVerticalAlign;
  175. }
  176. .ui.icon.message .icon:not(.close) + .content {
  177. padding-left: @iconContentDistance;
  178. }
  179. .ui.icon.message .circular.icon + .content {
  180. padding-left: @circularIconContentDistance;
  181. }
  182. /*--------------
  183. Floating
  184. ---------------*/
  185. .ui.floating.message {
  186. box-shadow: @floatingBoxShadow;
  187. }
  188. /*--------------
  189. Colors
  190. ---------------*/
  191. .ui.black.message {
  192. background-color: @black;
  193. color: @invertedTextColor;
  194. }
  195. /*--------------
  196. Types
  197. ---------------*/
  198. /* Inverted */
  199. .ui.inverted.message,
  200. .ui.black.message {
  201. background-color: @black;
  202. color: @invertedTextColor;
  203. }
  204. /* Positive / Negative */
  205. .ui.positive.message {
  206. background-color: @positiveBackgroundColor;
  207. color: @positiveTextColor;
  208. }
  209. .ui.positive.message .header {
  210. color: @positiveHeaderColor;
  211. }
  212. .ui.negative.message {
  213. background-color: @negativeBackgroundColor;
  214. color: @negativeTextColor;
  215. }
  216. .ui.negative.message .header {
  217. color: @negativeHeaderColor;
  218. }
  219. /* User Action */
  220. .ui.info.message {
  221. background-color: @infoBackgroundColor;
  222. color: @infoTextColor;
  223. }
  224. .ui.info.message .header {
  225. color: @infoHeaderColor;
  226. }
  227. .ui.warning.message {
  228. background-color: @warningBackgroundColor;
  229. color: @warningTextColor;
  230. }
  231. .ui.warning.message .header {
  232. color: @warningHeaderColor;
  233. }
  234. .ui.error.message {
  235. background-color: @errorBackgroundColor;
  236. color: @errorTextColor;
  237. }
  238. .ui.error.message .header {
  239. color: @errorHeaderColor;
  240. }
  241. .ui.success.message {
  242. background-color: @successBackgroundColor;
  243. color: @successTextColor;
  244. }
  245. .ui.success.message .header {
  246. color: @successHeaderColor;
  247. }
  248. /* Colors */
  249. .ui.blue.message {
  250. background-color: @blueBackground;
  251. color: @blueTextColor;
  252. }
  253. .ui.blue.message .header {
  254. color: @blueHeaderColor;
  255. }
  256. .ui.green.message {
  257. background-color: @greenBackground;
  258. color: @greenTextColor;
  259. }
  260. .ui.green.message .header {
  261. color: @greenHeaderColor;
  262. }
  263. .ui.orange.message {
  264. background-color: @orangeBackground;
  265. color: @orangeTextColor;
  266. }
  267. .ui.orange.message .header {
  268. color: @orangeHeaderColor;
  269. }
  270. .ui.pink.message {
  271. background-color: @pinkBackground;
  272. color: @pinkTextColor;
  273. }
  274. .ui.pink.message .header {
  275. color: @pinkHeaderColor;
  276. }
  277. .ui.purple.message {
  278. background-color: @purpleBackground;
  279. color: @purpleTextColor;
  280. }
  281. .ui.purple.message .header {
  282. color: @purpleHeaderColor;
  283. }
  284. .ui.red.message {
  285. background-color: @redBackground;
  286. color: @redTextColor;
  287. }
  288. .ui.red.message .header {
  289. color: @redHeaderColor;
  290. }
  291. .ui.teal.message {
  292. background-color: @tealBackground;
  293. color: @tealTextColor;
  294. }
  295. .ui.teal.message .header {
  296. color: @tealHeaderColor;
  297. }
  298. .ui.yellow.message {
  299. background-color: @yellowBackground;
  300. color: @yellowTextColor;
  301. }
  302. .ui.yellow.message .header {
  303. color: @yellowHeaderColor;
  304. }
  305. /*--------------
  306. Sizes
  307. ---------------*/
  308. .ui.small.message {
  309. font-size: @small;
  310. }
  311. .ui.message {
  312. font-size: @medium;
  313. }
  314. .ui.large.message {
  315. font-size: @large;
  316. }
  317. .ui.huge.message {
  318. font-size: @huge;
  319. }
  320. .ui.massive.message {
  321. font-size: @massive;
  322. }
  323. .loadUIOverrides();