UNPKG

@randstad-design/orbit-multitheme

Version:

multitheme Front-end code based on Randstad Human Forward components

227 lines (205 loc) 6.53 kB
.rating-dynamic { display: block; height: 65px; max-width: 375px; } .rating-dynamic .rating-dynamic__header { font-family: Montserrat, arial, sans-serif; font-size: 16px; text-transform: none; line-height: 25px; display: block; margin-bottom: 10px; margin-left: 20px; max-width: 375px; } .ratings { float: left; position: relative; } .ratings:focus-within { outline: 5px solid #2e2e2e; } .ratings .no--visually { clip: rect(0 0 0 0); -webkit-clip-path: inset(50%); clip-path: inset(50%); position: absolute; } .ratings svg { padding: 2px; } .ratings__input:checked + .icon svg { -webkit-animation: grow 0.5s; animation: grow 0.5s; } .ratings__input:focus + .icon svg { -webkit-animation: grow 0.5s; animation: grow 0.5s; } .ratings__description { font-family: Montserrat-SemiBold, arial, sans-serif; font-size: 20px; text-transform: none; line-height: 30px; opacity: 0; left: 0; margin-top: 5px; pointer-events: none; position: absolute; top: 30px; white-space: nowrap; } .ratings .icon { float: left; line-height: 30px; height: 30px; padding-left: 15px; width: 30px; } .ratings .icon:first-of-type { padding-left: 0; } .ratings .icon:hover + .ratings__description { opacity: 1; -webkit-transition: ease-in-out 0.2s; transition: ease-in-out 0.2s; } .ratings__input:checked + .icon + .ratings__description, .ratings .icon:hover + .ratings__description { opacity: 1; -webkit-transition: ease-in-out 0.2s; transition: ease-in-out 0.2s; } .ratings:hover .ratings__input:checked ~ .icon:hover svg, .ratings:hover .icon:hover svg, .ratings:hover .icon:hover ~ .icon svg { cursor: pointer; -webkit-transition: ease-in-out 0.2s; transition: ease-in-out 0.2s; } .ratings:hover .ratings__input:checked + .icon + .ratings__description { visibility: hidden; opacity: 0; -webkit-transition-duration: 0.1s; transition-duration: 0.1s; } .ratings:hover .ratings__input:checked + .icon:hover + .ratings__description { visibility: visible; opacity: 1; -webkit-transition-duration: 0.1s; transition-duration: 0.1s; } .ratings label span { pointer-events: none; } .ratings svg { fill: currentColor; } .ratings label { color: #ff661a; cursor: pointer; } .ratings input:checked ~ label { color: rgba(0, 0, 0, 0.1); } .ratings input:checked + label svg { color: #ff661a; border: 2px solid #ff661a; border-radius: 3px; } .ratings :hover input + label { color: #ff661a; } .ratings input:hover ~ label, .ratings input:focus ~ label { color: rgba(0, 0, 0, 0.1); } .ratings input:hover + label, .ratings input:focus + label { color: #ff661a; } @media (min-width: 375px) { .ratings__description { left: 100%; margin-left: 20px; margin-top: 0; top: 0; } } @-webkit-keyframes grow { 0% { -webkit-transform: scale(1); transform: scale(1); } 33% { -webkit-transform: scale(1.1); transform: scale(1.1); } 66% { -webkit-transform: scale(0.9); transform: scale(0.9); } 100% { -webkit-transform: scale(1); transform: scale(1); } } @keyframes grow { 0% { -webkit-transform: scale(1); transform: scale(1); } 33% { -webkit-transform: scale(1.1); transform: scale(1.1); } 66% { -webkit-transform: scale(0.9); transform: scale(0.9); } 100% { -webkit-transform: scale(1); transform: scale(1); } } /** READONLY **/ .rating__wrapper { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } .rating-readonly { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: reverse; -webkit-flex-direction: column-reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; -webkit-flex-wrap: wrap-reverse; -ms-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; height: 20px; -webkit-box-pack: end; -webkit-justify-content: flex-end; -ms-flex-pack: end; justify-content: flex-end; max-width: 290px; z-index: 0; } .rating-readonly.rating--l { min-width: 290px; } .rating-readonly.rating--m .rating-readonly__icon--wrapper, .rating-readonly.rating--m .icon--filled:before { width: 110px; } .rating-readonly.rating--s .rating-readonly__icon--wrapper, .rating-readonly.rating--s .icon--filled:before { width: 80px; } .rating-readonly__icon--wrapper { height: 20px; margin-right: 20px; width: 140px; } .rating-readonly__description { font-family: Montserrat, arial, sans-serif; font-size: 18px; text-transform: none; line-height: 30px; line-height: 20px; margin-top: 5px; } .icon--filled { background-size: 30px 20px; height: 20px; position: relative; } .icon--filled:before { background-size: 30px 20px; bottom: 0; content: ''; left: 0; opacity: 1; position: absolute; top: 0; width: 140px; z-index: -1; } @media only screen and (min-width: 310px) { .rating-readonly { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -webkit-flex-direction: row-reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; } .rating-readonly__description { margin-top: 0; } } .bg-brand--light-grey .icon--filled { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 5 45 20' width='30' height='20' fill='%23ff661a'%3E%3Cpath d='M29.951 10.817a1.002 1.002 0 00-.808-.68l-9.153-1.33L15.896.511c-.336-.683-1.457-.683-1.793 0L10.01 8.806l-9.154 1.33a1 1 0 00-.554 1.706L6.926 18.3l-1.564 9.117a1 1 0 001.451 1.054L15 24.167l8.186 4.304a1.006 1.006 0 001.054-.076 1 1 0 00.398-.978L23.074 18.3l6.624-6.458a1 1 0 00.253-1.025'/%3E%3C/svg%3E%0A"); } .bg-brand--light-grey .icon--filled:before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 5 45 20' width='30' height='20' fill='%23fff'%3E%3Cpath d='M29.951 10.817a1.002 1.002 0 00-.808-.68l-9.153-1.33L15.896.511c-.336-.683-1.457-.683-1.793 0L10.01 8.806l-9.154 1.33a1 1 0 00-.554 1.706L6.926 18.3l-1.564 9.117a1 1 0 001.451 1.054L15 24.167l8.186 4.304a1.006 1.006 0 001.054-.076 1 1 0 00.398-.978L23.074 18.3l6.624-6.458a1 1 0 00.253-1.025'/%3E%3C/svg%3E%0A"); -webkit-filter: invert(100%); filter: invert(100%); opacity: 0.1; } /*# sourceMappingURL=rating.css.map */