Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation icons #64

Open
Knyaz71 opened this issue Mar 9, 2022 · 1 comment
Open

Validation icons #64

Knyaz71 opened this issue Mar 9, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Knyaz71
Copy link

Knyaz71 commented Mar 9, 2022

Иконки валидации

.is-invalid + .select2-container--bootstrap-5 .select2-selection,
form.was-validated select:invalid + .select2-container--bootstrap-5 .select2-selection {
    padding-right: 4.125rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center,center right 2.25rem;
    background-size: 16px 12px,calc(.75em + .375rem) calc(.75em + .375rem);
}
.is-invalid + .select2-container--bootstrap-5 .select2-selection.select2-selection--multiple,
form.was-validated select:invalid + .select2-container--bootstrap-5 .select2-selection.select2-selection--multiple {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-position: center right 2.25rem;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

.is-valid + .select2-container--bootstrap-5 .select2-selection,
form.was-validated select:valid + .select2-container--bootstrap-5 .select2-selection {
    padding-right: 4.125rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center,center right 2.25rem;
    background-size: 16px 12px,calc(.75em + .375rem) calc(.75em + .375rem);
}
.is-valid + .select2-container--bootstrap-5 .select2-selection.select2-selection--multiple,
form.was-validated select:valid + .select2-container--bootstrap-5 .select2-selection.select2-selection--multiple {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-position: center right 2.25rem;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem)
}
@Knyaz71 Knyaz71 changed the title Valid icon Validation icons Mar 9, 2022
@apalfrey
Copy link
Owner

apalfrey commented May 8, 2022

This is something we're looking into, the concern is just that background-image is being used for the dropdown indicator.

@apalfrey apalfrey added the enhancement New feature or request label May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants