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.

420 lines
7.5 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
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: @headerParagraphDistance;
  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:first-child {
  71. margin-top: 0em;
  72. }
  73. .ui.message ul.list:last-child {
  74. margin-bottom: 0em;
  75. }
  76. .ui.message ul.list li {
  77. position: relative;
  78. list-style-type: none;
  79. margin: 0em 0em @listItemMargin @listItemIndent;
  80. padding: 0em;
  81. }
  82. .ui.message ul.list li:before {
  83. position: absolute;
  84. content: '•';
  85. left: -1em;
  86. height: 100%;
  87. vertical-align: baseline;
  88. }
  89. .ui.message ul.list li:last-child {
  90. margin-bottom: 0em;
  91. }
  92. /* Icon */
  93. .ui.message .icon {
  94. margin-right: @iconDistance;
  95. }
  96. /* Close Icon */
  97. .ui.message > .close.icon {
  98. cursor: pointer;
  99. position: absolute;
  100. top: @closeTopDistance;
  101. right: @closeRightDistance;
  102. opacity: @closeOpacity;
  103. transition:
  104. opacity 0.1s linear
  105. ;
  106. }
  107. .ui.message > .close.icon:hover {
  108. opacity: 1;
  109. }
  110. /* First / Last Element */
  111. .ui.message > :first-child {
  112. margin-top: 0em;
  113. }
  114. .ui.message > :last-child {
  115. margin-bottom: 0em;
  116. }
  117. /*******************************
  118. States
  119. *******************************/
  120. .ui.message.visible,
  121. .ui.header.visible {
  122. display: block !important;
  123. }
  124. .ui.message.hidden,
  125. .ui.header.hidden {
  126. display: none;
  127. }
  128. /*******************************
  129. Variations
  130. *******************************/
  131. /*--------------
  132. Compact
  133. ---------------*/
  134. .ui.compact.message {
  135. display: inline-block;
  136. }
  137. /*--------------
  138. Attached
  139. ---------------*/
  140. .ui.attached.message {
  141. margin-bottom: @attachedYOffset;
  142. border-radius: @borderRadius @borderRadius 0em 0em;
  143. box-shadow:
  144. @attachedBoxShadow
  145. ;
  146. margin-left: @attachedXOffset;
  147. margin-right: @attachedXOffset;
  148. }
  149. .ui.attached + .ui.attached.message:not(.top):not(.bottom) {
  150. margin-top: @attachedYOffset;
  151. border-radius: 0em;
  152. }
  153. .ui.bottom.attached.message {
  154. margin-top: @attachedYOffset;
  155. border-radius: 0em 0em @borderRadius @borderRadius;
  156. box-shadow: @attachedBottomBoxShadow;
  157. }
  158. .ui.bottom.attached.message:not(:last-child) {
  159. margin-bottom: @verticalMargin;
  160. }
  161. .ui.attached.icon.message {
  162. display: block;
  163. width: auto;
  164. }
  165. /*--------------
  166. Icon
  167. ---------------*/
  168. .ui.icon.message {
  169. display: table;
  170. width: 100%;
  171. }
  172. .ui.icon.message > .icon:not(.close) {
  173. display: table-cell;
  174. vertical-align: @iconVerticalAlign;
  175. font-size: @iconSize;
  176. opacity: @iconOpacity;
  177. }
  178. .ui.icon.message > .content {
  179. display: table-cell;
  180. vertical-align: @iconVerticalAlign;
  181. }
  182. .ui.icon.message .icon:not(.close) + .content {
  183. padding-left: @iconContentDistance;
  184. }
  185. .ui.icon.message .circular.icon + .content {
  186. padding-left: @circularIconContentDistance;
  187. }
  188. /*--------------
  189. Floating
  190. ---------------*/
  191. .ui.floating.message {
  192. box-shadow: @floatingBoxShadow;
  193. }
  194. /*--------------
  195. Colors
  196. ---------------*/
  197. .ui.black.message {
  198. background-color: @black;
  199. color: @invertedTextColor;
  200. }
  201. /*--------------
  202. Types
  203. ---------------*/
  204. /* Positive */
  205. .ui.positive.message {
  206. background-color: @positiveBackgroundColor;
  207. color: @positiveTextColor;
  208. }
  209. .ui.positive.message,
  210. .ui.attached.positive.message {
  211. box-shadow:
  212. 0px 0px 0px 1px @positiveBorderColor inset,
  213. @subtleShadow
  214. ;
  215. }
  216. .ui.positive.message .header {
  217. color: @positiveHeaderColor;
  218. }
  219. /* Negative */
  220. .ui.negative.message {
  221. background-color: @negativeBackgroundColor;
  222. color: @negativeTextColor;
  223. }
  224. .ui.negative.message,
  225. .ui.attached.negative.message {
  226. box-shadow:
  227. 0px 0px 0px 1px @negativeBorderColor inset,
  228. @subtleShadow
  229. ;
  230. }
  231. .ui.negative.message .header {
  232. color: @negativeHeaderColor;
  233. }
  234. /* Info */
  235. .ui.info.message {
  236. background-color: @infoBackgroundColor;
  237. color: @infoTextColor;
  238. }
  239. .ui.info.message,
  240. .ui.attached.info.message {
  241. box-shadow:
  242. 0px 0px 0px 1px @infoBorderColor inset,
  243. @subtleShadow
  244. ;
  245. }
  246. .ui.info.message .header {
  247. color: @infoHeaderColor;
  248. }
  249. /* Warning */
  250. .ui.warning.message {
  251. background-color: @warningBackgroundColor;
  252. color: @warningTextColor;
  253. }
  254. .ui.warning.message,
  255. .ui.attached.warning.message {
  256. box-shadow:
  257. 0px 0px 0px 1px @warningBorderColor inset,
  258. @subtleShadow
  259. ;
  260. }
  261. .ui.warning.message .header {
  262. color: @warningHeaderColor;
  263. }
  264. /* Error */
  265. .ui.error.message {
  266. background-color: @errorBackgroundColor;
  267. color: @errorTextColor;
  268. }
  269. .ui.error.message,
  270. .ui.attached.error.message {
  271. box-shadow:
  272. 0px 0px 0px 1px @errorBorderColor inset,
  273. @subtleShadow
  274. ;
  275. }
  276. .ui.error.message .header {
  277. color: @errorHeaderColor;
  278. }
  279. /* Success */
  280. .ui.success.message {
  281. background-color: @successBackgroundColor;
  282. color: @successTextColor;
  283. }
  284. .ui.success.message,
  285. .ui.attached.success.message {
  286. box-shadow:
  287. 0px 0px 0px 1px @successBorderColor inset,
  288. @subtleShadow
  289. ;
  290. }
  291. .ui.success.message .header {
  292. color: @successHeaderColor;
  293. }
  294. /* Colors */
  295. .ui.inverted.message,
  296. .ui.black.message {
  297. background-color: @black;
  298. color: @invertedTextColor;
  299. }
  300. .ui.blue.message {
  301. background-color: @blueBackground;
  302. color: @blueTextColor;
  303. }
  304. .ui.blue.message .header {
  305. color: @blueHeaderColor;
  306. }
  307. .ui.green.message {
  308. background-color: @greenBackground;
  309. color: @greenTextColor;
  310. }
  311. .ui.green.message .header {
  312. color: @greenHeaderColor;
  313. }
  314. .ui.orange.message {
  315. background-color: @orangeBackground;
  316. color: @orangeTextColor;
  317. }
  318. .ui.orange.message .header {
  319. color: @orangeHeaderColor;
  320. }
  321. .ui.pink.message {
  322. background-color: @pinkBackground;
  323. color: @pinkTextColor;
  324. }
  325. .ui.pink.message .header {
  326. color: @pinkHeaderColor;
  327. }
  328. .ui.purple.message {
  329. background-color: @purpleBackground;
  330. color: @purpleTextColor;
  331. }
  332. .ui.purple.message .header {
  333. color: @purpleHeaderColor;
  334. }
  335. .ui.red.message {
  336. background-color: @redBackground;
  337. color: @redTextColor;
  338. }
  339. .ui.red.message .header {
  340. color: @redHeaderColor;
  341. }
  342. .ui.teal.message {
  343. background-color: @tealBackground;
  344. color: @tealTextColor;
  345. }
  346. .ui.teal.message .header {
  347. color: @tealHeaderColor;
  348. }
  349. .ui.yellow.message {
  350. background-color: @yellowBackground;
  351. color: @yellowTextColor;
  352. }
  353. .ui.yellow.message .header {
  354. color: @yellowHeaderColor;
  355. }
  356. /*--------------
  357. Sizes
  358. ---------------*/
  359. .ui.small.message {
  360. font-size: @small;
  361. }
  362. .ui.message {
  363. font-size: @medium;
  364. }
  365. .ui.large.message {
  366. font-size: @large;
  367. }
  368. .ui.huge.message {
  369. font-size: @huge;
  370. }
  371. .ui.massive.message {
  372. font-size: @massive;
  373. }
  374. .loadUIOverrides();