UNPKG

@qvant/qui-max

Version:

A Vue 3 Design system for Web.

108 lines 3.03 kB
.q-checkbox { --checkbox-color-base: rgb(var(--color-base-regular-rgb) / 96%); --checkbox-color-disabled: rgb(var(--color-rgb-gray) / 64%); --checkbox-background-color-base: var(--color-tertiary-gray-ultra-light); --checkbox-background-color-hover: var(--color-tertiary-gray); --checkbox-background-color-disabled: var(--color-tertiary-gray); --checkbox-mark-color-base: var(--color-accent-secondary-main); --checkbox-mark-color-disabled: rgb(var(--color-rgb-gray) / 64%); --checkbox-box-shadow-base: 1px 1px 3px rgb(var(--color-rgb-blue) / 40%); --checkbox-box-shadow-focus: 1px 1px 3px rgb(var(--color-rgb-blue) / 40%), inset 0 0 0 1px var(--color-accent-secondary-main); position: relative; display: inline-flex; font-size: var(--font-size-base); font-weight: var(--font-weight-base); line-height: 1; color: var(--checkbox-color-base); white-space: nowrap; vertical-align: middle; cursor: pointer; user-select: none; outline: none; } .q-checkbox__label { padding-left: 16px; font-size: var(--font-size-base); color: var(--checkbox-color-base); word-break: break-word; white-space: normal; } .q-checkbox_disabled .q-checkbox__label { color: var(--checkbox-color-disabled); cursor: not-allowed; } .q-checkbox__label_size_regular { margin-top: 2px; font-size: 14px; line-height: 20px; } .q-checkbox__label_size_small { --checkbox-color-base: rgb(var(--color-base-regular-rgb) / 64%); margin-top: 5px; font-size: 10px; line-height: 14px; } .q-checkbox__input { position: relative; line-height: 0; white-space: nowrap; cursor: pointer; border: none; outline: none; } .q-checkbox__inner { position: relative; z-index: 1; box-sizing: border-box; display: inline-block; width: 24px; height: 24px; overflow: hidden; background-color: var(--checkbox-background-color-base); border: none; border-radius: var(--border-radius-base); box-shadow: var(--checkbox-box-shadow-base); } .q-checkbox__inner:hover { background-color: var(--checkbox-background-color-hover); } .q-checkbox__inner-icon { position: absolute; top: 4px; left: 4px; box-sizing: content-box; width: 16px; font-size: 16px; color: var(--checkbox-mark-color-base); text-align: center; } .q-checkbox_checked .q-checkbox__inner::after, .q-checkbox__input_indeterminate .q-checkbox__inner::after { opacity: 1; } .q-checkbox__input_focus .q-checkbox__inner { box-shadow: var(--checkbox-box-shadow-focus); } .q-checkbox_disabled .q-checkbox__inner { cursor: not-allowed; background-color: var(--checkbox-background-color-disabled); } .q-checkbox_disabled .q-checkbox__inner-icon { color: var(--checkbox-mark-color-disabled); cursor: not-allowed; } .q-form-item_is-error .q-checkbox__inner, .q-form-item_is-error .q-checkbox__inner .q-checkbox__input_focus { border: var(--border-error); } .q-checkbox__original { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; margin: 0; outline: none; opacity: 0; }