placeholder.css 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. /*!
  2. * # Fomantic-UI - Loader
  3. * http://github.com/fomantic/Fomantic-UI/
  4. *
  5. *
  6. * Released under the MIT license
  7. * http://opensource.org/licenses/MIT
  8. *
  9. */
  10. /*-------------------
  11. Content
  12. --------------------*/
  13. .ui.placeholder {
  14. position: static;
  15. overflow: hidden;
  16. -webkit-animation: placeholderShimmer 2s linear;
  17. animation: placeholderShimmer 2s linear;
  18. -webkit-animation-iteration-count: infinite;
  19. animation-iteration-count: infinite;
  20. background-color: #FFFFFF;
  21. background-image: -webkit-gradient(linear, left top, right top, color-stop(0, rgba(0, 0, 0, 0.08)), color-stop(15%, rgba(0, 0, 0, 0.15)), color-stop(30%, rgba(0, 0, 0, 0.08)));
  22. background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.08) 0, rgba(0, 0, 0, 0.15) 15%, rgba(0, 0, 0, 0.08) 30%);
  23. background-image: linear-gradient(to right, rgba(0, 0, 0, 0.08) 0, rgba(0, 0, 0, 0.15) 15%, rgba(0, 0, 0, 0.08) 30%);
  24. background-size: 1200px 100%;
  25. max-width: 30rem;
  26. }
  27. @-webkit-keyframes placeholderShimmer {
  28. 0% {
  29. background-position: -1200px 0;
  30. }
  31. 100% {
  32. background-position: 1200px 0;
  33. }
  34. }
  35. @keyframes placeholderShimmer {
  36. 0% {
  37. background-position: -1200px 0;
  38. }
  39. 100% {
  40. background-position: 1200px 0;
  41. }
  42. }
  43. .ui.placeholder + .ui.placeholder {
  44. margin-top: 2rem;
  45. }
  46. .ui.placeholder + .ui.placeholder {
  47. -webkit-animation-delay: 0.15s;
  48. animation-delay: 0.15s;
  49. }
  50. .ui.placeholder + .ui.placeholder + .ui.placeholder {
  51. -webkit-animation-delay: 0.3s;
  52. animation-delay: 0.3s;
  53. }
  54. .ui.placeholder + .ui.placeholder + .ui.placeholder + .ui.placeholder {
  55. -webkit-animation-delay: 0.45s;
  56. animation-delay: 0.45s;
  57. }
  58. .ui.placeholder + .ui.placeholder + .ui.placeholder + .ui.placeholder + .ui.placeholder {
  59. -webkit-animation-delay: 0.6s;
  60. animation-delay: 0.6s;
  61. }
  62. .ui.placeholder,
  63. .ui.placeholder > :before,
  64. .ui.placeholder .image.header:after,
  65. .ui.placeholder .line,
  66. .ui.placeholder .line:after {
  67. background-color: #FFFFFF;
  68. }
  69. .ui.placeholder.hidden {
  70. display: none;
  71. }
  72. /* Image */
  73. .ui.placeholder .image:not(.header):not(.ui):not(.icon) {
  74. height: 100px;
  75. }
  76. .ui.placeholder .square.image:not(.header) {
  77. height: 0;
  78. overflow: hidden;
  79. /* 1/1 aspect ratio */
  80. padding-top: 100%;
  81. }
  82. .ui.placeholder .rectangular.image:not(.header) {
  83. height: 0;
  84. overflow: hidden;
  85. /* 4/3 aspect ratio */
  86. padding-top: 75%;
  87. }
  88. /* Lines */
  89. .ui.placeholder .line {
  90. position: relative;
  91. height: 0.85714286em;
  92. }
  93. .ui.placeholder .line:before,
  94. .ui.placeholder .line:after {
  95. top: 100%;
  96. position: absolute;
  97. content: '';
  98. background-color: inherit;
  99. }
  100. .ui.placeholder .line:before {
  101. left: 0;
  102. }
  103. .ui.placeholder .line:after {
  104. right: 0;
  105. }
  106. /* Any Lines */
  107. .ui.placeholder .line {
  108. margin-bottom: 0.5em;
  109. }
  110. .ui.placeholder .line:before,
  111. .ui.placeholder .line:after {
  112. height: 0.5em;
  113. }
  114. .ui.placeholder .line:not(:first-child) {
  115. margin-top: 0.5em;
  116. }
  117. /* Line Outdent */
  118. .ui.placeholder .line:nth-child(1):after {
  119. width: 0;
  120. }
  121. .ui.placeholder .line:nth-child(2):after {
  122. width: 50%;
  123. }
  124. .ui.placeholder .line:nth-child(3):after {
  125. width: 10%;
  126. }
  127. .ui.placeholder .line:nth-child(4):after {
  128. width: 35%;
  129. }
  130. .ui.placeholder .line:nth-child(5):after {
  131. width: 65%;
  132. }
  133. /* Header Image + 2 Lines */
  134. .ui.placeholder .header {
  135. position: relative;
  136. overflow: hidden;
  137. }
  138. /* Header Line 1 & 2*/
  139. .ui.placeholder .header .line {
  140. margin-bottom: 0.64285714em;
  141. }
  142. .ui.placeholder .header .line:before,
  143. .ui.placeholder .header .line:after {
  144. height: 0.64285714em;
  145. }
  146. .ui.placeholder .header .line:not(:first-child) {
  147. margin-top: 0.64285714em;
  148. }
  149. .ui.placeholder .header .line:after {
  150. width: 20%;
  151. }
  152. .ui.placeholder .header .line:nth-child(2):after {
  153. width: 60%;
  154. }
  155. /* Image Header */
  156. .ui.placeholder .image.header .line {
  157. margin-left: 3em;
  158. }
  159. .ui.placeholder .image.header .line:before {
  160. width: 0.71428571rem;
  161. }
  162. .ui.placeholder .image.header:after {
  163. display: block;
  164. height: 0.85714286em;
  165. content: '';
  166. margin-left: 3em;
  167. }
  168. /* Spacing */
  169. .ui.placeholder .image .line:first-child,
  170. .ui.placeholder .paragraph .line:first-child,
  171. .ui.placeholder .header .line:first-child {
  172. height: 0.01px;
  173. }
  174. .ui.placeholder .image:not(:first-child):before,
  175. .ui.placeholder .paragraph:not(:first-child):before,
  176. .ui.placeholder .header:not(:first-child):before {
  177. height: 1.42857143em;
  178. content: '';
  179. display: block;
  180. }
  181. /* Inverted Content Loader */
  182. .ui.inverted.placeholder {
  183. background-image: -webkit-gradient(linear, left top, right top, color-stop(0, rgba(255, 255, 255, 0.08)), color-stop(15%, rgba(255, 255, 255, 0.14)), color-stop(30%, rgba(255, 255, 255, 0.08)));
  184. background-image: -webkit-linear-gradient(left, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.14) 15%, rgba(255, 255, 255, 0.08) 30%);
  185. background-image: linear-gradient(to right, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.14) 15%, rgba(255, 255, 255, 0.08) 30%);
  186. }
  187. .ui.inverted.placeholder,
  188. .ui.inverted.placeholder > :before,
  189. .ui.inverted.placeholder .image.header:after,
  190. .ui.inverted.placeholder .line,
  191. .ui.inverted.placeholder .line:after {
  192. background-color: #1B1C1D;
  193. }
  194. /*******************************
  195. Variations
  196. *******************************/
  197. /*-------------------
  198. Sizes
  199. --------------------*/
  200. .ui.placeholder .full.line.line.line:after {
  201. width: 0;
  202. }
  203. .ui.placeholder .very.long.line.line.line:after {
  204. width: 10%;
  205. }
  206. .ui.placeholder .long.line.line.line:after {
  207. width: 35%;
  208. }
  209. .ui.placeholder .medium.line.line.line:after {
  210. width: 50%;
  211. }
  212. .ui.placeholder .short.line.line.line:after {
  213. width: 65%;
  214. }
  215. .ui.placeholder .very.short.line.line.line:after {
  216. width: 80%;
  217. }
  218. /*-------------------
  219. Fluid
  220. --------------------*/
  221. .ui.fluid.placeholder {
  222. max-width: none;
  223. }
  224. /*******************************
  225. Theme Overrides
  226. *******************************/