UNPKG

react-health-card

Version:
208 lines (179 loc) 4.97 kB
.react-health-card__container { position: relative; -webkit-perspective: 1000px; perspective: 1000px; width: 350px; height: 200px; color: white; } .react-health-card { border-radius: 10px; line-height: 1; position: relative; width: 100%; height: 100%; min-width: 315px; -webkit-transform-style: preserve-3d; -ms-transform-style: preserve-3d; -o-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transition: all 400ms linear; transition: all 400ms linear; -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); } .react-health-card--flipped { -webkit-transform: rotateY(180deg); -ms-transform: rotateY(180deg); transform: rotateY(180deg); } .react-health-card__front, .react-health-card__back { -webkit-backface-visibility: hidden; backface-visibility: hidden; transform-style: preserve-3d; -webkit-transition: all 400ms linear; transition: all 400ms linear; -webkit-transform-style: preserve-3d; -ms-transform-style: preserve-3d; -o-transform-style: preserve-3d; width: 100%; height: 100%; position: absolute; top: 0; left: 0; overflow: hidden; border-radius: 10px; background: #DDDDDD; z-index: 0; } .react-health-card__back { -webkit-transform: rotateY(180deg); -ms-transform: rotateY(180deg); transform: rotateY(180deg); } .react-health-card__display { color: white; font-weight: normal; opacity: 0.5; -webkit-transition: opacity 400ms linear; transition: opacity 400ms linear; } .react-health-card__number { font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace; font-size: 24px; clear: both; margin-bottom: 30px; } .react-health-card__name { text-transform: uppercase; font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace; font-size: 20px; max-height: 45px; position: absolute; bottom: 0; width: 190px; -webkit-line-clamp: 2; -webkit-box-orient: horizontal; overflow: hidden; text-overflow: ellipsis; line-height: 1.2em; } .react-health-card__expiry { font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace; letter-spacing: 0em; position: relative; float: right; width: 25%; } .react-health-card__expiry:before { content: attr(data-before); margin-bottom: 2px; font-size: 7px; text-transform: uppercase; } .react-health-card__expiry:after { position: absolute; content: attr(data-after); text-align: right; right: 100%; margin-right: 5px; margin-top: 2px; bottom: 0; } .react-health-card__expiry:before, .react-health-card__expiry:after { font-family: "Helvetica Neue"; font-weight: bold; font-size: 7px; white-space: pre; display: block; opacity: 0.5; } .react-health-card__upper { width: 80%; position: absolute; left: 10%; top: 15%; } .react-health-card__lower { width: 80%; position: absolute; left: 10%; bottom: 15%; } .react-health-card__shiny { width: 50px; height: 35px; margin-bottom: 10px; border-radius: 5px; background: #CCC; position: relative; } .react-health-card__shiny:after { content: attr(data-after); position: absolute; left: 120%; top: 5%; color: white; font-size: 7px; width: 230px; opacity: 0.5; } .react-health-card__shiny:before { content: " "; display: block; width: 70%; height: 60%; border-top-right-radius: 5px; border-bottom-right-radius: 5px; background: #d9d9d9; position: absolute; top: 20%; } .react-health-card__bar { background-color: #444; background-image: -webkit-linear-gradient(#444, #333); background-image: -webkit-gradient(linear, left top, left bottom, from(#444), to(#333)); background-image: linear-gradient(#444, #333); width: 100%; height: 20%; position: absolute; top: 15%; } .react-health-card__back .react-health-card__shiny { position: absolute; top: 66%; left: 2%; } .react-health-card--unknown { -webkit-box-shadow: none; box-shadow: none; } .react-health-card--unknown .react-health-card__logo { visibility: hidden; } .react-health-card__front, .react-health-card__back { background: linear-gradient(to right, #6290e4, #2053B1); } .react-health-card__attribute { position: absolute; } .react-health-card__editable { opacity: 0.5 !important; font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace; letter-spacing: 0em; } .react-health-card__with-content:before { content: attr(data-before); font-family: "Helvetica Neue"; position: absolute; font-size: 10px; white-space: nowrap; top: -15px; } .react-health-card--focused { opacity: 1 !important; font-weight: 700 !important; } .react-health-card--ahm .react-health-card__front, .react-health-card--ahm .react-health-card__back { background: linear-gradient(to right, #353535, #000000); } .react-health-card__logo.react-health-card--ahm { width: 70px; } .react-health-card__logo.react-health-card--default { width: 70px; }