From 5a490f732552b299ff23c0963ef456663be25fa3 Mon Sep 17 00:00:00 2001 From: marination Date: Mon, 10 May 2021 17:07:48 +0530 Subject: [PATCH] chore: Add global style for radio buttons --- frappe/public/scss/common/global.scss | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/frappe/public/scss/common/global.scss b/frappe/public/scss/common/global.scss index e9646b30e5..6c28dc939d 100644 --- a/frappe/public/scss/common/global.scss +++ b/frappe/public/scss/common/global.scss @@ -18,6 +18,44 @@ $check-icon: url("data:image/svg+xml, "); +input[type="radio"] { + position: relative; + width: var(--checkbox-size) !important; + height: var(--checkbox-size); + margin-right: 8px !important; + font-size: calc(var(--checkbox-size) - 1px); + background-repeat: no-repeat; + background-position: center; + cursor: pointer; + + // Reset browser behavior + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + + -webkit-print-color-adjust: exact; + color-adjust: exact; + + &:focus { + outline: none; + } + + &:before { + width: var(--checkbox-size); + height: var(--checkbox-size); + position: absolute; + content: ' '; + border: 1px solid var(--gray-400); + border-radius: 16px; + } + + &:checked::before { + background-color: #2490EF; + border-radius: 16px; + box-shadow: inset 0 0 0 2px white; + } +} + input[type="checkbox"] { position: relative; width: var(--checkbox-size) !important;