placeholder-loading.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /**
  2. * placeholder-loading v0.5.0
  3. * Author: Zalog (https://www.zalog.ro/)
  4. * License: MIT
  5. **/
  6. .ph-item {
  7. position: relative;
  8. display: flex;
  9. flex-wrap: wrap;
  10. margin-bottom: 30px;
  11. padding: 30px 15px 15px 15px;
  12. overflow: hidden;
  13. direction: ltr;
  14. background-color: #fff;
  15. border: 1px solid #e6e6e6;
  16. border-radius: 2px;
  17. }
  18. .ph-item,
  19. .ph-item *,
  20. .ph-item ::after,
  21. .ph-item ::before {
  22. box-sizing: border-box;
  23. }
  24. .ph-item::before {
  25. position: absolute;
  26. top: 0;
  27. right: 0;
  28. bottom: 0;
  29. left: 50%;
  30. z-index: 1;
  31. width: 500%;
  32. margin-left: -250%;
  33. background: linear-gradient(to right, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 54%) 50% 50%;
  34. -webkit-animation: phAnimation 0.8s linear infinite;
  35. animation: phAnimation 0.8s linear infinite;
  36. content: " ";
  37. pointer-events: none;
  38. }
  39. .ph-item > * {
  40. display: flex;
  41. flex: 1 1 auto;
  42. flex-flow: column;
  43. margin-bottom: 15px;
  44. padding-right: 15px;
  45. padding-left: 15px;
  46. }
  47. .ph-row {
  48. display: flex;
  49. flex-wrap: wrap;
  50. margin-top: -7.5px;
  51. }
  52. .ph-row div {
  53. height: 10px;
  54. margin-top: 7.5px;
  55. background-color: #ced4da;
  56. }
  57. .ph-row .big, .ph-row.big div {
  58. height: 20px;
  59. }
  60. .ph-row .empty {
  61. background-color: rgba(255, 255, 255, 0);
  62. }
  63. .ph-col-2 {
  64. flex: 0 0 16.6666666667%;
  65. }
  66. .ph-col-4 {
  67. flex: 0 0 33.3333333333%;
  68. }
  69. .ph-col-6 {
  70. flex: 0 0 50%;
  71. }
  72. .ph-col-8 {
  73. flex: 0 0 66.6666666667%;
  74. }
  75. .ph-col-10 {
  76. flex: 0 0 83.3333333333%;
  77. }
  78. .ph-col-12 {
  79. flex: 0 0 100%;
  80. }
  81. [class*=ph-col] {
  82. direction: ltr;
  83. }
  84. [class*=ph-col] > * + .ph-row {
  85. margin-top: 0;
  86. }
  87. [class*=ph-col] > * + * {
  88. margin-top: 7.5px;
  89. }
  90. .ph-avatar {
  91. position: relative;
  92. width: 100%;
  93. min-width: 60px;
  94. overflow: hidden;
  95. background-color: #ced4da;
  96. border-radius: 50%;
  97. }
  98. .ph-avatar::before {
  99. display: block;
  100. padding-top: 100%;
  101. content: " ";
  102. }
  103. .ph-picture {
  104. width: 100%;
  105. height: 120px;
  106. background-color: #ced4da;
  107. }
  108. @-webkit-keyframes phAnimation {
  109. 0% {
  110. transform: translate3d(-30%, 0, 0);
  111. }
  112. 100% {
  113. transform: translate3d(30%, 0, 0);
  114. }
  115. }
  116. @keyframes phAnimation {
  117. 0% {
  118. transform: translate3d(-30%, 0, 0);
  119. }
  120. 100% {
  121. transform: translate3d(30%, 0, 0);
  122. }
  123. }