placeholder.css 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. /*!
  2. * # Semantic UI 2.4.2 - Loader
  3. * http://github.com/semantic-org/semantic-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, from(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. /* Image */
  70. .ui.placeholder .image:not(.header):not(.ui) {
  71. height: 100px;
  72. }
  73. .ui.placeholder .square.image:not(.header) {
  74. height: 0px;
  75. overflow: hidden;
  76. /* 1/1 aspect ratio */
  77. padding-top: 100%;
  78. }
  79. .ui.placeholder .rectangular.image:not(.header) {
  80. height: 0px;
  81. overflow: hidden;
  82. /* 4/3 aspect ratio */
  83. padding-top: 75%;
  84. }
  85. /* Lines */
  86. .ui.placeholder .line {
  87. position: relative;
  88. height: 0.85714286em;
  89. }
  90. .ui.placeholder .line:before,
  91. .ui.placeholder .line:after {
  92. top: 100%;
  93. position: absolute;
  94. content: '';
  95. background-color: inherit;
  96. }
  97. .ui.placeholder .line:before {
  98. left: 0px;
  99. }
  100. .ui.placeholder .line:after {
  101. right: 0px;
  102. }
  103. /* Any Lines */
  104. .ui.placeholder .line {
  105. margin-bottom: 0.5em;
  106. }
  107. .ui.placeholder .line:before,
  108. .ui.placeholder .line:after {
  109. height: 0.5em;
  110. }
  111. .ui.placeholder .line:not(:first-child) {
  112. margin-top: 0.5em;
  113. }
  114. /* Header Image + 2 Lines */
  115. .ui.placeholder .header {
  116. position: relative;
  117. overflow: hidden;
  118. }
  119. /* Line Outdent */
  120. .ui.placeholder .line:nth-child(1):after {
  121. width: 0%;
  122. }
  123. .ui.placeholder .line:nth-child(2):after {
  124. width: 50%;
  125. }
  126. .ui.placeholder .line:nth-child(3):after {
  127. width: 10%;
  128. }
  129. .ui.placeholder .line:nth-child(4):after {
  130. width: 35%;
  131. }
  132. .ui.placeholder .line:nth-child(5):after {
  133. width: 65%;
  134. }
  135. /* Header Line 1 & 2*/
  136. .ui.placeholder .header .line {
  137. margin-bottom: 0.64285714em;
  138. }
  139. .ui.placeholder .header .line:before,
  140. .ui.placeholder .header .line:after {
  141. height: 0.64285714em;
  142. }
  143. .ui.placeholder .header .line:not(:first-child) {
  144. margin-top: 0.64285714em;
  145. }
  146. .ui.placeholder .header .line:after {
  147. width: 20%;
  148. }
  149. .ui.placeholder .header .line:nth-child(2):after {
  150. width: 60%;
  151. }
  152. /* Image Header */
  153. .ui.placeholder .image.header .line {
  154. margin-left: 3em;
  155. }
  156. .ui.placeholder .image.header .line:before {
  157. width: 0.71428571rem;
  158. }
  159. .ui.placeholder .image.header:after {
  160. display: block;
  161. height: 0.85714286em;
  162. content: '';
  163. margin-left: 3em;
  164. }
  165. /* Spacing */
  166. .ui.placeholder .image .line:first-child,
  167. .ui.placeholder .paragraph .line:first-child,
  168. .ui.placeholder .header .line:first-child {
  169. height: 0.01px;
  170. }
  171. .ui.placeholder .image:not(:first-child):before,
  172. .ui.placeholder .paragraph:not(:first-child):before,
  173. .ui.placeholder .header:not(:first-child):before {
  174. height: 1.42857143em;
  175. content: '';
  176. display: block;
  177. }
  178. /* Inverted Content Loader */
  179. .ui.inverted.placeholder {
  180. background-image: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0.08)), color-stop(15%, rgba(255, 255, 255, 0.14)), color-stop(30%, rgba(255, 255, 255, 0.08)));
  181. 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%);
  182. 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%);
  183. }
  184. .ui.inverted.placeholder,
  185. .ui.inverted.placeholder > :before,
  186. .ui.inverted.placeholder .image.header:after,
  187. .ui.inverted.placeholder .line,
  188. .ui.inverted.placeholder .line:after {
  189. background-color: #1B1C1D;
  190. }
  191. /*******************************
  192. Variations
  193. *******************************/
  194. /*-------------------
  195. Sizes
  196. --------------------*/
  197. .ui.placeholder .full.line.line.line:after {
  198. width: 0%;
  199. }
  200. .ui.placeholder .very.long.line.line.line:after {
  201. width: 10%;
  202. }
  203. .ui.placeholder .long.line.line.line:after {
  204. width: 35%;
  205. }
  206. .ui.placeholder .medium.line.line.line:after {
  207. width: 50%;
  208. }
  209. .ui.placeholder .short.line.line.line:after {
  210. width: 65%;
  211. }
  212. .ui.placeholder .very.short.line.line.line:after {
  213. width: 80%;
  214. }
  215. /*-------------------
  216. Fluid
  217. --------------------*/
  218. .ui.fluid.placeholder {
  219. max-width: none;
  220. }