UNPKG

@talentsoft-opensource/hylia

Version:

The Hylia design systems. Contains all the building blocks style rules for Talentsoft.

143 lines (114 loc) 3.36 kB
input[type="checkbox"] { position: absolute; overflow: hidden; clip: rect(0 0 0 0); width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; } .Hylia-a-inputCheckbox { display: flex; align-items: center; &__input { &:checked:not(:disabled) { & + .Hylia-a-inputCheckbox__apparence { animation: onFocusChecked 1s; border: 0.2rem solid @terran; background-color: @terran; &:before { color: @stormtrooper; } &:hover { border-color: darken(@terran, 20%); background-color: darken(@terran, 20%); } } } // Style when Input is checked && disabled &:checked:disabled { & + .Hylia-a-inputCheckbox__apparence { border: 0.2rem solid @apprentice; &:before { color: @knight; } } } // Style when Input is disabled &:disabled { & + .Hylia-a-inputCheckbox__apparence { border: 0.2rem solid @apprentice; background-color: @apprentice; &:before { background-color: transparent; } } } &:focus { &:checked:not(:disabled) { & + .Hylia-a-inputCheckbox__apparence { box-shadow: 0 0 0 0.4rem fade(@terran, 30%); } } &:not(:disabled) { & + .Hylia-a-inputCheckbox__apparence { box-shadow: 0 0 0 0.3rem fade(@apprentice, 30%); } } } &:focus:disabled { & + .Hylia-a-inputCheckbox__apparence { animation: onFocus 1s; } } } &__apparence { position: relative; display: inline-block; width: 1.6rem; height: 1.6rem; margin-right: 1rem; cursor: pointer; transition: 0.5s all; border: 0.2rem solid @minion; border-radius: @radius; background-color: @stormtrooper; &:before { font-family: "talentsoft-font-icons" !important; font-size: 1.3rem; font-weight: normal; font-style: normal; font-variant: normal; line-height: 0; position: absolute; top: 55%; left: 50%; content: "\E945"; transition: all 0.5s ease-out; transform: translate(-50%, -72%); text-transform: none; color: transparent; -webkit-font-smoothing: antialiased; } &:hover { border-color: darken(@minion, 20%); } } } @keyframes onFocusChecked { 0% { box-shadow: 0 0 0 0 @terran; } 100% { box-shadow: 0 0 0 0.6rem fade(@terran, 0); } } @keyframes onFocus { 0% { box-shadow: 0 0 0 0 @apprentice; } 100% { box-shadow: 0 0 0 0.6rem fade(@apprentice, 0); } }