ember-content-placeholders
Version:
Composable components for rendering animated content placeholders like facebook
225 lines (219 loc) • 9.64 kB
CSS
@keyframes emberContentPlaceholdersAnimation {
0% {
transform: translate3d(-30%, 0, 0); }
100% {
transform: translate3d(100%, 0, 0); } }
.ember-content-placeholders-heading {
display: flex; }
[class^="ember-content-placeholders-"] + .ember-content-placeholders-heading {
margin-top: 20px; }
.ember-content-placeholders-heading__img {
position: relative;
overflow: hidden;
height: 15px;
background: #eee;
width: 60px;
height: 60px;
margin-right: 15px; }
.ember-content-placeholders-is-rounded .ember-content-placeholders-heading__img, .ember-content-placeholders-heading__img.ember-content-placeholders-is-rounded {
border-radius: 6px; }
.ember-content-placeholders-is-centered .ember-content-placeholders-heading__img, .ember-content-placeholders-heading__img.ember-content-placeholders-is-centered {
margin-left: auto;
margin-right: auto; }
.ember-content-placeholders-is-animated .ember-content-placeholders-heading__img::before, .ember-content-placeholders-heading__img.ember-content-placeholders-is-animated::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100vw;
max-width: 1000px;
height: 100%;
background: linear-gradient(to right, transparent 0%, #e1e1e1 15%, transparent 30%);
animation-duration: 1.5s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: emberContentPlaceholdersAnimation;
animation-timing-function: linear; }
.ember-content-placeholders-heading__content {
display: flex;
flex: 1;
flex-direction: column;
justify-content: center; }
.ember-content-placeholders-heading__title {
position: relative;
overflow: hidden;
height: 15px;
background: #eee;
width: 85%;
margin-bottom: 10px;
background: #ccc; }
.ember-content-placeholders-is-rounded .ember-content-placeholders-heading__title, .ember-content-placeholders-heading__title.ember-content-placeholders-is-rounded {
border-radius: 6px; }
.ember-content-placeholders-is-centered .ember-content-placeholders-heading__title, .ember-content-placeholders-heading__title.ember-content-placeholders-is-centered {
margin-left: auto;
margin-right: auto; }
.ember-content-placeholders-is-animated .ember-content-placeholders-heading__title::before, .ember-content-placeholders-heading__title.ember-content-placeholders-is-animated::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100vw;
max-width: 1000px;
height: 100%;
background: linear-gradient(to right, transparent 0%, #e1e1e1 15%, transparent 30%);
animation-duration: 1.5s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: emberContentPlaceholdersAnimation;
animation-timing-function: linear; }
.ember-content-placeholders-heading__subtitle {
position: relative;
overflow: hidden;
height: 15px;
background: #eee;
width: 90%; }
.ember-content-placeholders-is-rounded .ember-content-placeholders-heading__subtitle, .ember-content-placeholders-heading__subtitle.ember-content-placeholders-is-rounded {
border-radius: 6px; }
.ember-content-placeholders-is-centered .ember-content-placeholders-heading__subtitle, .ember-content-placeholders-heading__subtitle.ember-content-placeholders-is-centered {
margin-left: auto;
margin-right: auto; }
.ember-content-placeholders-is-animated .ember-content-placeholders-heading__subtitle::before, .ember-content-placeholders-heading__subtitle.ember-content-placeholders-is-animated::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100vw;
max-width: 1000px;
height: 100%;
background: linear-gradient(to right, transparent 0%, #e1e1e1 15%, transparent 30%);
animation-duration: 1.5s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: emberContentPlaceholdersAnimation;
animation-timing-function: linear; }
[class^="ember-content-placeholders-"] + .ember-content-placeholders-text {
margin-top: 20px; }
.ember-content-placeholders-text__line {
position: relative;
overflow: hidden;
height: 15px;
background: #eee;
width: 100%;
margin-bottom: 10px; }
.ember-content-placeholders-is-rounded .ember-content-placeholders-text__line, .ember-content-placeholders-text__line.ember-content-placeholders-is-rounded {
border-radius: 6px; }
.ember-content-placeholders-is-centered .ember-content-placeholders-text__line, .ember-content-placeholders-text__line.ember-content-placeholders-is-centered {
margin-left: auto;
margin-right: auto; }
.ember-content-placeholders-is-animated .ember-content-placeholders-text__line::before, .ember-content-placeholders-text__line.ember-content-placeholders-is-animated::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100vw;
max-width: 1000px;
height: 100%;
background: linear-gradient(to right, transparent 0%, #e1e1e1 15%, transparent 30%);
animation-duration: 1.5s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: emberContentPlaceholdersAnimation;
animation-timing-function: linear; }
.ember-content-placeholders-text__line:nth-child(4n + 1) {
width: 80%; }
.ember-content-placeholders-text__line:nth-child(4n + 2) {
width: 100%; }
.ember-content-placeholders-text__line:nth-child(4n + 3) {
width: 70%; }
.ember-content-placeholders-text__line:nth-child(4n + 4) {
width: 85%; }
.ember-content-placeholders-img {
position: relative;
overflow: hidden;
height: 15px;
background: #eee;
width: 100%;
height: 120px; }
.ember-content-placeholders-is-rounded .ember-content-placeholders-img, .ember-content-placeholders-img.ember-content-placeholders-is-rounded {
border-radius: 6px; }
.ember-content-placeholders-is-centered .ember-content-placeholders-img, .ember-content-placeholders-img.ember-content-placeholders-is-centered {
margin-left: auto;
margin-right: auto; }
.ember-content-placeholders-is-animated .ember-content-placeholders-img::before, .ember-content-placeholders-img.ember-content-placeholders-is-animated::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100vw;
max-width: 1000px;
height: 100%;
background: linear-gradient(to right, transparent 0%, #e1e1e1 15%, transparent 30%);
animation-duration: 1.5s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: emberContentPlaceholdersAnimation;
animation-timing-function: linear; }
[class^="ember-content-placeholders-"] + .ember-content-placeholders-img {
margin-top: 20px; }
.ember-content-placeholders-nav {
display: flex;
padding: 5px 0;
justify-content: space-between; }
.ember-content-placeholders-nav__logo {
position: relative;
overflow: hidden;
height: 15px;
background: #eee;
width: 60px;
background: #ccc; }
.ember-content-placeholders-is-rounded .ember-content-placeholders-nav__logo, .ember-content-placeholders-nav__logo.ember-content-placeholders-is-rounded {
border-radius: 6px; }
.ember-content-placeholders-is-centered .ember-content-placeholders-nav__logo, .ember-content-placeholders-nav__logo.ember-content-placeholders-is-centered {
margin-left: auto;
margin-right: auto; }
.ember-content-placeholders-is-animated .ember-content-placeholders-nav__logo::before, .ember-content-placeholders-nav__logo.ember-content-placeholders-is-animated::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100vw;
max-width: 1000px;
height: 100%;
background: linear-gradient(to right, transparent 0%, #e1e1e1 15%, transparent 30%);
animation-duration: 1.5s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: emberContentPlaceholdersAnimation;
animation-timing-function: linear; }
.ember-content-placeholders-nav__content {
display: flex; }
.ember-content-placeholders-nav__item {
position: relative;
overflow: hidden;
height: 15px;
background: #eee;
width: 45px;
margin-left: 10px; }
.ember-content-placeholders-is-rounded .ember-content-placeholders-nav__item, .ember-content-placeholders-nav__item.ember-content-placeholders-is-rounded {
border-radius: 6px; }
.ember-content-placeholders-is-centered .ember-content-placeholders-nav__item, .ember-content-placeholders-nav__item.ember-content-placeholders-is-centered {
margin-left: auto;
margin-right: auto; }
.ember-content-placeholders-is-animated .ember-content-placeholders-nav__item::before, .ember-content-placeholders-nav__item.ember-content-placeholders-is-animated::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100vw;
max-width: 1000px;
height: 100%;
background: linear-gradient(to right, transparent 0%, #e1e1e1 15%, transparent 30%);
animation-duration: 1.5s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: emberContentPlaceholdersAnimation;
animation-timing-function: linear; }
.ember-content-placeholders-nav__item:nth-child(1) {
width: 160px; }
.ember-content-placeholders-nav__item:nth-child(3) {
width: 120px; }