mediaembed.css 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. /* MediaEmbed */
  2. .mediaembed,
  3. .mediaembed-responsive {
  4. margin: 0 auto;
  5. overflow: hidden;
  6. -webkit-box-sizing: content-box;
  7. -moz-box-sizing: content-box;
  8. box-sizing: content-box;
  9. }
  10. .mediaembed-media .mediaembed-media,
  11. .mediaembed-media embed,
  12. .mediaembed-media iframe,
  13. .mediaembed-media object,
  14. .mediaembed-media video,
  15. .mediaembed-embed img {
  16. top: 0;
  17. left: 0;
  18. width: 100%;
  19. height: 100%;
  20. position: absolute;
  21. z-index: 1;
  22. }
  23. /* Media screen of death */
  24. .mediaembed-msod {
  25. background-color: #000;
  26. color: white;
  27. display: block;
  28. font-size: 80%;
  29. overflow: hidden;
  30. padding: 1em;
  31. position: relative;
  32. text-align: center;
  33. vertical-align: middle;
  34. z-index: 1;
  35. }
  36. .mediaembed-msod:before {
  37. content: "";
  38. display: block;
  39. position: absolute;
  40. z-index: -1;
  41. /* We make the element extra-large so we can shuffle it around without exposing the edges */
  42. height: 300%;
  43. left: -100%;
  44. top: -100%;
  45. width: 300%;
  46. -webkit-animation: grain 5s steps(10) infinite;
  47. -moz-animation: grain 5s steps(10) infinite;
  48. -ms-animation: grain 5s steps(10) infinite;
  49. animation: grain 5s steps(10) infinite;
  50. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg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7BSflSt3bfa1tv8Di3R8n3Af7MNWzs49hmauE2wP+ttrq+AsWpFG2awvsuOqbipWHgtuvuaAE+A1Z/7gC9hesnr+7wqCwG8c5yAg3AL1fm8T9AZtp/bbJGwl1pNrE7RuOX7PeMRUERVaPpEs+yqeoSmuOlokqw49pgomjLeh7icHNlG19yjs6XXOMedYm5xH2YxpV2tc0Ro2jJfxC50ApuxGob7lMsxfTbeUv07TyYxpeLucEH1gNd4IKH2LAg5TdVhlCafZvpskfncCfx8pOhJzd76bJWeYFnFciwcYfubRc12Ip/ppIhA1/mSZ/RxjFDrJC5xifFjJpY2Xl5zXdguFqYyTR1zSp1Y9p+tktDYYSNflcxI0iyO4TPBdlRcpeqjK/piF5bklq77VSEaA+z8qmJTFzIWiitbnzR794USKBUaT0NTEsVjZqLaFVqJoPN9ODG70IPbfBHKK+/q/AWR0tJzYHRULOa4MP+W/HfGadZUbfw177G7j/OGbIs8TahLyynl4X4RinF793Oz+BU0saXtUHrVBFT/DnA3ctNPoGbs4hRIjTok8i+algT1lTHi4SxFvONKNrgQFAq2/gFnWMXgwffgYMJpiKYkmW3tTg3ZQ9Jq+f8XN+A5eeUKHWvJWJ2sgJ1Sop+wwhqFVijqWaJhwtD8MNlSBeWNNWTa5Z5kPZw5+LbVT99wqTdx29lMUH4OIG/D86ruKEauBjvH5xy6um/Sfj7ei6UUVk4AIl3MyD4MSSTOFgSwsH/QJWaQ5as7ZcmgBZkzjjU1UrQ74ci1gWBCSGHtuV1H2mhSnO3Wp/3fEV5a+4wz//6qy8JxjZsmxxy5+4w9CDNJY09T072iKG0EnOS0arEYgXqYnXcYHwjTtUNAcMelOd4xpkoqiTYICWFq0JSiPfPDQdnt+4/wuqcXY47QILbgAAAABJRU5ErkJggg==);
  51. }
  52. .mediaembed-msod .mediaembed-icon {
  53. font-size: 7em;
  54. line-height: 1em;
  55. margin: 0.25em auto 0;
  56. }
  57. .mediaembed-msod p b {
  58. display: block;
  59. font-weight: bold;
  60. text-align: center;
  61. }
  62. .mediaembed-msod .mediaembed-error-message {
  63. margin: 0 3em 1em;
  64. text-align: justify;
  65. }
  66. .mediaembed-msod .mediaembed-error-message b {
  67. color: #f00;
  68. text-transform: uppercase;
  69. }
  70. /* MediaEmbed media */
  71. .mediaembed-container {
  72. position: relative;
  73. }
  74. /* MediaEmbed Play button */
  75. .mediaembed-play {
  76. margin: auto;
  77. position: absolute;
  78. top: 0;
  79. right: 0;
  80. bottom: 0;
  81. left: 10px;
  82. width: 1em;
  83. height: 1em;
  84. color: #fff;
  85. display: block;
  86. font-size: 6em;
  87. line-height: 1;
  88. text-align: center;
  89. text-shadow: 0 0 2px #ccc;
  90. visibility: visible;
  91. opacity: 1;
  92. z-index: 2;
  93. }
  94. .mediaembed-play:before {
  95. box-shadow: 0 0 2px 0 #ccc inset, 0 0 2px 0 #ccc;
  96. border: medium solid;
  97. border-radius: 100%;
  98. content: "";
  99. display: block;
  100. height: 120%;
  101. left: calc(-10% - 10px);
  102. position: absolute;
  103. top: calc(-5% - 5px);
  104. width: 120%;
  105. }
  106. .mediaembed-play::after {
  107. bottom: -1000%;
  108. content: "";
  109. display: block;
  110. left: -1000%;
  111. position: absolute;
  112. right: -1000%;
  113. top: -1000%;
  114. }
  115. .mediaembed-play:hover {
  116. color: #ccc;
  117. }
  118. .mediaembed-media iframe ~ .mediaembed-play,
  119. .mediaembed-media input:checked ~ .mediaembed-play {
  120. visibility: hidden;
  121. opacity: 0;
  122. z-index: 1;
  123. -webkit-transition: opacity 1.5s ease-in-out 0s, visibility 1.5s linear 0s, z-index 1.5s linear 0s;
  124. -moz-transition: opacity 1.5s ease-in-out 0s, visibility 1.5s linear 0s, z-index 1.5s linear 0s;
  125. -ms-transition: opacity 1.5s ease-in-out 0s, visibility 1.5s linear 0s, z-index 1.5s linear 0s;
  126. -o-transition: opacity 1.5s ease-in-out 0s, visibility 1.5s linear 0s, z-index 1.5s linear 0s;
  127. transition: opacity 1.5s ease-in-out 0s, visibility 1.5s linear 0s, z-index 1.5s linear 0s;
  128. }
  129. .mediaembed-media iframe ~ .mediaembed-play,
  130. .mediaembed-media input:checked ~ .mediaembed-play:before {
  131. -webkit-animation: ring 1.5s ease-in-out 1;
  132. -moz-animation: ring 1.5s ease-in-out 1;
  133. -ms-animation: ring 1.5s ease-in-out 1;
  134. -o-animation: ring 1.5s ease-in-out 1;
  135. animation: ring 1.5s ease-in-out 1;
  136. }
  137. .mediaembed-media input:checked ~ noscript iframe {
  138. display: block !important;
  139. }
  140. .mediaembed-media .mediaembed-input {
  141. display: none;
  142. }
  143. .mediaembed-thumbnail {
  144. margin: auto;
  145. position: absolute;
  146. top: -50%;
  147. right: 0;
  148. bottom: -50%;
  149. left: 0;
  150. width: 100%;
  151. z-index: 0;
  152. }
  153. /* GitHub adjustments */
  154. .mediaembed-github {
  155. overflow: auto;
  156. }
  157. .mediaembed-github .gist .line-numbers {
  158. width: 4em;
  159. }
  160. .mediaembed-github .gist-file {
  161. padding: 1em;
  162. }
  163. /*
  164. * Animations
  165. */
  166. /* -- Grain -- */
  167. @-webkit-keyframes grain {
  168. 0%, 100% {
  169. -webkit-transform: translate(0, 0);
  170. }
  171. 10% {
  172. -webkit-transform: translate(-5%, -10%);
  173. }
  174. 20% {
  175. -webkit-transform: translate(-15%, 5%);
  176. }
  177. 30% {
  178. -webkit-transform: translate(7%, -25%);
  179. }
  180. 40% {
  181. -webkit-transform: translate(-5%, 25%);
  182. }
  183. 50% {
  184. -webkit-transform: translate(-15%, 10%);
  185. }
  186. 60% {
  187. -webkit-transform: translate(15%, 0%);
  188. }
  189. 70% {
  190. -webkit-transform: translate(0%, 15%);
  191. }
  192. 80% {
  193. -webkit-transform: translate(3%, 20%);
  194. }
  195. 90% {
  196. -webkit-transform: translate(-10%, 10%);
  197. }
  198. }
  199. @-moz-keyframes grain {
  200. 0%, 100% {
  201. -moz-transform: translate(0, 0);
  202. }
  203. 10% {
  204. -moz-transform: translate(-5%, -10%);
  205. }
  206. 20% {
  207. -moz-transform: translate(-15%, 5%);
  208. }
  209. 30% {
  210. -moz-transform: translate(7%, -25%);
  211. }
  212. 40% {
  213. -moz-transform: translate(-5%, 25%);
  214. }
  215. 50% {
  216. -moz-transform: translate(-15%, 10%);
  217. }
  218. 60% {
  219. -moz-transform: translate(15%, 0%);
  220. }
  221. 70% {
  222. -moz-transform: translate(0%, 15%);
  223. }
  224. 80% {
  225. -moz-transform: translate(3%, 20%);
  226. }
  227. 90% {
  228. -moz-transform: translate(-10%, 10%);
  229. }
  230. }
  231. @-ms-keyframes grain {
  232. 0%, 100% {
  233. -ms-transform: translate(0, 0);
  234. }
  235. 10% {
  236. -ms-transform: translate(-5%, -10%);
  237. }
  238. 20% {
  239. -ms-transform: translate(-15%, 5%);
  240. }
  241. 30% {
  242. -ms-transform: translate(7%, -25%);
  243. }
  244. 40% {
  245. -ms-transform: translate(-5%, 25%);
  246. }
  247. 50% {
  248. -ms-transform: translate(-15%, 10%);
  249. }
  250. 60% {
  251. -ms-transform: translate(15%, 0%);
  252. }
  253. 70% {
  254. -ms-transform: translate(0%, 15%);
  255. }
  256. 80% {
  257. -ms-transform: translate(3%, 20%);
  258. }
  259. 90% {
  260. -ms-transform: translate(-10%, 10%);
  261. }
  262. }
  263. @keyframes grain {
  264. 0%, 100% {
  265. transform: translate(0, 0);
  266. }
  267. 10% {
  268. transform: translate(-5%, -10%);
  269. }
  270. 20% {
  271. transform: translate(-15%, 5%);
  272. }
  273. 30% {
  274. transform: translate(7%, -25%);
  275. }
  276. 40% {
  277. transform: translate(-5%, 25%);
  278. }
  279. 50% {
  280. transform: translate(-15%, 10%);
  281. }
  282. 60% {
  283. transform: translate(15%, 0%);
  284. }
  285. 70% {
  286. transform: translate(0%, 15%);
  287. }
  288. 80% {
  289. transform: translate(3%, 20%);
  290. }
  291. 90% {
  292. transform: translate(-10%, 10%);
  293. }
  294. }
  295. /* -- Ring -- */
  296. @keyframes ring {
  297. 0% {
  298. transform: scale(1);
  299. opacity: 1;
  300. border-width: medium;
  301. }
  302. /* hidden */
  303. 100% {
  304. transform: scale(3);
  305. opacity: 0;
  306. border-width: thin;
  307. }
  308. }