mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 03:11:19 +02:00
Simplify checkbox & radio input (#30557)
- Define background properties in `.form-check-input` - Use `background-size: contain` to simplify background sizes (especially for those with linear gradients) - Remove double `color-adjust` - Adjust svgs to 20x20 box. This way the strokes aren't rescaled.
This commit is contained in:
@@ -649,25 +649,18 @@ $form-check-input-focus-box-shadow: $input-btn-focus-box-shadow !default;
|
||||
$form-check-input-checked-color: $component-active-color !default;
|
||||
$form-check-input-checked-bg-color: $component-active-bg !default;
|
||||
$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default;
|
||||
$form-check-input-checked-bg-repeat: no-repeat !default;
|
||||
$form-check-input-checked-bg-position: center center !default;
|
||||
$form-check-input-checked-bg-size: 1em !default;
|
||||
$form-check-input-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='#{$form-check-input-checked-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M4 8.5L6.5 11l6-6'/></svg>") !default;
|
||||
$form-check-input-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$form-check-input-checked-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/></svg>") !default;
|
||||
$form-check-radio-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='2' fill='#{$form-check-input-checked-color}'/></svg>") !default;
|
||||
|
||||
$form-check-input-indeterminate-color: $component-active-color !default;
|
||||
$form-check-input-indeterminate-bg-color: $component-active-bg !default;
|
||||
$form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default;
|
||||
$form-check-input-indeterminate-bg-repeat: no-repeat !default;
|
||||
$form-check-input-indeterminate-bg-position: center center !default;
|
||||
$form-check-input-indeterminate-bg-size: 1em !default;
|
||||
$form-check-input-indeterminate-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='#{$form-check-input-indeterminate-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M5 8h6'/></svg>") !default;
|
||||
$form-check-input-indeterminate-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$form-check-input-indeterminate-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/></svg>") !default;
|
||||
|
||||
$form-switch-color: rgba(0, 0, 0, .25) !default;
|
||||
$form-switch-width: 2em !default;
|
||||
$form-switch-padding-left: $form-switch-width + .5em !default;
|
||||
$form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-color}'/></svg>") !default;
|
||||
$form-switch-bg-size: contain !default;
|
||||
$form-switch-border-radius: $form-switch-width !default;
|
||||
|
||||
$form-switch-focus-color: hsla(211, 100%, 75%, 1) !default;
|
||||
|
Reference in New Issue
Block a user