You are here

blazy.media.css in Blazy 8.2

Same filename and directory in other branches
  1. 8 css/components/blazy.media.css
  2. 7 css/components/blazy.media.css

Provides media integration with pure CSS fluid video wrapper.

File

css/components/blazy.media.css
View source
  1. /**
  2. * @file
  3. * Provides media integration with pure CSS fluid video wrapper.
  4. */
  5. /** Ensures not affecting iframe only without media switcher */
  6. .media--switch iframe {
  7. opacity: 0;
  8. visibility: hidden;
  9. }
  10. .media__icon,
  11. .media--ratio iframe {
  12. transition: visibility 0s linear 0.5s, opacity 0.5s linear;
  13. }
  14. .media__icon {
  15. cursor: pointer;
  16. display: block;
  17. opacity: 0;
  18. position: absolute;
  19. visibility: hidden;
  20. z-index: 8;
  21. }
  22. .media__icon--play,
  23. .media__icon--close,
  24. .media__icon--spinner {
  25. height: 80px;
  26. left: 50%;
  27. top: 50%;
  28. -ms-transform: translate(-50%, -50%);
  29. -webkit-transform: translate(-50%, -50%);
  30. transform: translate(-50%, -50%);
  31. width: 80px;
  32. }
  33. .media__icon--close::before,
  34. .media__icon--close::after,
  35. .media__icon--play::before {
  36. content: '';
  37. display: block;
  38. position: absolute;
  39. pointer-events: none;
  40. }
  41. .media__icon--close::before,
  42. .media__icon--close::after {
  43. background: white;
  44. border-radius: 4px;
  45. height: 8px;
  46. left: 50%;
  47. margin: -4px 0 0 -40px;
  48. top: 50%;
  49. width: 80px;
  50. -ms-transform: rotate(45deg);
  51. -webkit-transform: rotate(45deg);
  52. transform: rotate(45deg);
  53. }
  54. .media__icon--close::after {
  55. -ms-transform: rotate(-45deg);
  56. -webkit-transform: rotate(-45deg);
  57. transform: rotate(-45deg);
  58. }
  59. .media__icon--close:hover::before,
  60. .media__icon--close:hover::after {
  61. background-color: #ff6d2c;
  62. }
  63. .media__icon--play {
  64. border: 8px solid white;
  65. border-radius: 50%;
  66. }
  67. .media__icon--play::before {
  68. border: 16px solid transparent;
  69. border-left: 24px solid white;
  70. left: 50%;
  71. line-height: 60px;
  72. margin: -16px 0 0 -6px;
  73. top: 50%;
  74. }
  75. .media__icon--play:hover {
  76. border-color: #ff6d2c;
  77. }
  78. .media__icon--play:hover::before {
  79. border-left-color: #ff6d2c;
  80. }
  81. .is-playing:hover .media__icon {
  82. transition-delay: 0s;
  83. }
  84. .is-playing .media__icon--close {
  85. visibility: hidden;
  86. }
  87. .media__icon--play,
  88. .media:hover .media__icon--litebox,
  89. .media--switch img,
  90. .media--switch.is-playing iframe,
  91. .media--switch.is-playing:hover .media__icon--close {
  92. opacity: 1;
  93. visibility: visible;
  94. }
  95. .media--switch.is-playing img,
  96. .media--switch.is-playing .media__icon--play,
  97. .media--switch.is-playing:hover .media__icon--play {
  98. opacity: 0;
  99. position: absolute;
  100. visibility: hidden;
  101. z-index: -1;
  102. }
  103. .media--switch.is-playing iframe {
  104. z-index: 3;
  105. }
  106. /** @requires coder shutup, front-end complication with inline styles. */
  107. /** Prevents Twitter iframe from breaking grid, even if unholy. */
  108. .grid .twitter-tweet-rendered {
  109. margin: 0 !important; /* csslint allow: known-properties, important */
  110. min-width: 1px !important; /* csslint allow: known-properties, important */
  111. }
  112. /** Fix for overflowing Facebook/ Twitter iframes. */
  113. .grid .media,
  114. .grid .fb_iframe_widget {
  115. overflow: hidden;
  116. }
  117. .grid .fb_iframe_widget span {
  118. width: 100% !important; /* csslint allow: known-properties, important */
  119. }
  120. .grid .fb_iframe_widget iframe {
  121. position: relative !important; /* csslint allow: known-properties, important */
  122. }