// // Options page styles. // // @package Additional Block Styles // @copyright WebMan Design, Oliver Juhas // // @since 1.6.0 // @version 1.7.0 // .abs-input { &-code { min-width: 16em; font-family: ui-monospace, monospace; } &-switch { box-sizing: content-box; position: relative; display: inline-block; width: 2em; height: 1em; font-size: 1em; background: #3858e9; border: .25em solid transparent; border-radius: 2em; cursor: pointer; transition: background .3s, color .3s, border .3s, transform .3s; &::before { content: ''; box-sizing: border-box; position: absolute; height: 1em; width: 1em; inset-inline-end: 0; top: 0; background: #fff; border: 2px solid transparent; border-radius: 2em; transition: inset .3s, background .3s, color .3s, border .3s; } } } .abs-form-field-checkboxes { display: grid; column-gap: 2em; grid-auto-columns: max-content; max-width: 1000px; padding-inline: 0; margin-inline: 0; list-style: none; li { position: relative; padding: 0; margin: 0; border: 1px solid transparent; border-bottom: 1px dotted; &:hover .abs-input-switch { transform: scale(1.25); } } label { display: flex; align-items: center; gap: 1em; padding: .75em .5em; font-weight: 500; overflow: hidden; } .has-description label { align-items: flex-start; } input { position: absolute; inset-inline-start: -999em; &:focus + .abs-input-switch { outline-width: 2px; outline-style: dotted; outline-offset: 2px; outline-color: currentColor; } &:checked + .abs-input-switch { background: #ccc; &::before { inset-inline-end: 1em; background: transparent; border-color: currentColor; } } } @media (min-width: 480px) { grid-template-columns: repeat( 2, 1fr ); } @media (min-width: 1200px) { grid-template-columns: repeat( 3, 1fr ); } } .abs-input-description { display: block; margin-top: .25em; font-size: .9em; font-weight: 400; font-style: italic; }