UNPKG

pxt-core

Version:

Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors

98 lines (83 loc) 2.16 kB
.common-checkbox { position: relative; padding: 0.25rem; display: flex; align-items: center; cursor: pointer; input { margin-right: 0.5rem; } } .common-checkbox.menu-item-checkbox { padding: 0; input { margin-right: 0.75rem; // This is matching the size of semantic ui icons width: 18.875px; height: 16px; } } .common-checkbox.toggle { input { opacity: 0; width: 3rem; height: 1.5rem; position: absolute; left: 0; top: 0; } label { position: relative; padding-left: 4rem; &::before { content: ""; position: absolute; left: 0; top: 0; width: 3rem; height: 1.5rem; background-color: var(--pxt-neutral-background2); border-radius: 500rem; transition: background-color 0.2s ease-in-out; border: 1px solid var(--pxt-neutral-stencil2); } &::after { background: var(--pxt-neutral-background1) linear-gradient(transparent, var(--pxt-neutral-alpha10)); position: absolute; content: ""; opacity: 1; border: none; width: 1.5rem; height: 1.5rem; top: 0; left: 0; border-radius: 500rem; border: 1px solid var(--pxt-neutral-foreground2); transition: background .3s ease, left .3s ease; } } input:checked~label { &::before { background-color: var(--pxt-primary-background); } &::after { left: 1.5rem; } } } .common-checkbox:focus-within { outline: @checkboxFocusOutline; border-radius: 0.2em; } #profile-email-checkbox { width: 2rem; } /**************************************************** * High Contrast * ****************************************************/ .high-contrast { .common-checkbox:hover, .common-checkbox:focus-within { outline: @highContrastFocusOutline; } }