Snippet in sintassi Less/Sass
Personalizzare iframe perché sia responsive rispetto una dimensione orizzontale
iframe{
--dimensione-iframe : 100vw;
width: calc(var(--dimensione-iframe) - (var(--bs-gutter-x)));
height: calc((var(--dimensione-iframe) - (var(--bs-gutter-x))) / 16 * 9);
border-radius: 20px;
transition: all 0.4s;
@media all and (min-width: 576px) { --dimensione-iframe : 540px; }
@media all and (min-width: 768px) { --dimensione-iframe : 720px; }
@media all and (min-width: 992px) { --dimensione-iframe : 960px; }
@media all and (min-width: 1200px) { --dimensione-iframe : 1140px; }
@media all and (min-width: 1400px) { --dimensione-iframe : 1320px; }
@media all and (min-width: 1900px) { --dimensione-iframe : 1500px; }
/* @media all and (min-width: 1920px) { --dimensione-iframe : 1820px; } */
}
Cambiando il selettore, funziona anche per gli input Radio.
E' possibile aggiungere un background-image all'after
input[type="checkbox"]{
-webkit-appearance: none;
-moz-appearance: none;
position: relative;
top: 0px;
display: inline-block;
margin: 0;
/* width: 1.5rem; */
min-width: 1.5rem;
height: 1.5rem;
background: #fff;
border-radius: 27px;
border-style: solid;
border-width: 0.1rem;
border-color: #dcd7ca;
box-shadow: none;
cursor: pointer;
&:after{
content: "";
width: 0%;
height: 0%;
background-color: red;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
transition: all 0.4s;
border-radius: 100%;
}
&:checked{
&:after{
width: 100%;
height: 100%;
border: 1px solid white;
}
}
&:focus, &:focus-visible{
border-color: #80bdff;
outline: transparent;
box-shadow: 0 0 0 0.1rem rgba(0,123,255,.25);
}
}
#iubenda-iframe{
h1,
p{
color: black!important;
}
input[type="checkbox"]{
background-color: unset;
&:after{
display: none;
}
}
}
input{
width: 100%;
&::file-selector-button {
margin-right: 20px;
border: none;
background: red;
background: white;
border: 2px solid white;
padding: 3px 18px;
border-radius: 5px;
color: black;
cursor: pointer;
transition: background .2s ease-in-out;
}
&:focus,
&:focus-visible,
&:hover{
&::file-selector-button {
border: 2px solid red;
}
}
}