UNPKG

glass-app-manager

Version:

Informatica's Glass Framework CLI for bootstrapping

173 lines (148 loc) 4.54 kB
.pretty * { box-sizing: border-box; } .pretty input:not([type='checkbox']):not([type='radio']) { display: none; } .pretty { position: relative; display: inline-block; margin-right: 1em; white-space: nowrap; line-height: 1; } .pretty input { position: absolute; left: 0; top: 0; min-width: 1em; width: 100%; height: 100%; z-index: 2; opacity: 0; margin: 0; padding: 0; cursor: pointer; } .pretty .state label { position: initial; display: inline-block; font-weight: normal; margin: 0; text-indent: 1.5em; min-width: calc(1em + 2px); } .pretty .state label:before, .pretty .state label:after { content: ''; width: calc(1em + 2px); height: calc(1em + 2px); display: block; box-sizing: border-box; border-radius: 0; border: 1px solid transparent; z-index: 0; position: absolute; left: 0; top: calc((0% - (100% - 1em)) - 8%); background-color: transparent; } .pretty .state label:before { border-color: #000; } .pretty .state.p-is-hover, .pretty .state.p-is-indeterminate { display: none; } .pretty.p-default.p-fill .state label:after { transform: scale(1); } .pretty.p-default .state label:after { transform: scale(0.6); } .pretty.p-default input:checked ~ .state label:after { background-color: #000 !important; } .pretty.p-switch input { min-width: 2em; } .pretty.p-switch .state { position: relative; } .pretty.p-switch .state:before { content: ''; border: 1px solid #000; border-radius: 60px; width: 2em; box-sizing: unset; height: calc(1em + 2px); position: absolute; top: 0; top: calc((0% - (100% - 1em)) - 16%); z-index: 0; transition: all 0.5s ease; } .pretty.p-switch .state label { text-indent: 2.5em; } .pretty.p-switch .state label:before, .pretty.p-switch .state label:after { transition: all 0.5s ease; border-radius: 100%; left: 0; border-color: transparent; transform: scale(0.8); } .pretty.p-switch .state label:after { background-color: #000 !important; } .pretty.p-switch input:checked ~ .state:before { border-color: #5a656b; } .pretty.p-switch input:checked ~ .state label:before { opacity: 0; } .pretty.p-switch input:checked ~ .state label:after { background-color: #5a656b !important; left: 1em; } .pretty.p-switch.p-fill input:checked ~ .state:before { border-color: #5a656b; background-color: #5a656b !important; } .pretty.p-switch.p-fill input:checked ~ .state label:before { opacity: 0; } .pretty.p-switch.p-fill input:checked ~ .state label:after { background-color: #fff !important; left: 1em; } .pretty.p-icon .state .icon { position: absolute; font-size: 1em; width: calc(1em + 2px); height: calc(1em + 2px); left: 0; z-index: 1; text-align: center; line-height: normal; top: calc((0% - (100% - 1em)) - 8%); border: 1px solid transparent; opacity: 0; } .pretty.p-icon .state .icon:before { margin: 0; width: 100%; height: 100%; text-align: center; display: flex; flex: 1; justify-content: center; align-items: center; line-height: 1; } .pretty.p-icon input:checked ~ .state .icon { opacity: 1; } .pretty.p-icon input:checked ~ .state label:before { border-color: #5a656b; } .pretty.p-round .state label:before, .pretty.p-round .state label:after { border-radius: 100%; } .pretty.p-round.p-icon .state .icon { border-radius: 100%; overflow: hidden; } .pretty.p-round.p-icon .state .icon:before { transform: scale(0.8); } .pretty input[disabled] { cursor: not-allowed; display: none; } .pretty input[disabled] ~ * { opacity: .5; } .pretty.p-locked input { display: none; cursor: not-allowed; } .pretty.p-has-indeterminate input[type='checkbox']:indeterminate ~ .state:not(.p-is-indeterminate) { display: none; } .pretty.p-has-indeterminate input[type='checkbox']:indeterminate ~ .state.p-is-indeterminate { display: block; } .pretty.p-has-indeterminate input[type='checkbox']:indeterminate ~ .state.p-is-indeterminate .icon { display: block; opacity: 1; } .pretty.p-icon .state .icon { color: white; background: #000; border-color: black; } .pretty.p-icon .state .icon:before { display: block; line-height: inherit; }