Style color input, add color picker to the demo
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
input[type="checkbox"],
|
||||
input[type="color"] {
|
||||
-webkit-appearance: none;
|
||||
position: relative;
|
||||
appearance: none;
|
||||
@ -52,6 +53,7 @@ input[type="checkbox"] {
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
vertical-align: -0.1875em;
|
||||
border-radius: 50%;
|
||||
|
||||
&::before {
|
||||
@ -64,6 +66,7 @@ input[type="radio"] {
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
vertical-align: -0.1875em;
|
||||
border-radius: calc(var(--rounded-corner-small) / 2);
|
||||
|
||||
&::before {
|
||||
@ -80,3 +83,29 @@ input[type="checkbox"] {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
input[type="color"] {
|
||||
vertical-align: -0.375em;
|
||||
border: 0.25rem solid var(--fg-muted-2);
|
||||
border-radius: var(--rounded-corner-small);
|
||||
padding: 0;
|
||||
width: 3rem;
|
||||
height: 2rem;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--fg-muted-2);
|
||||
}
|
||||
|
||||
&::-moz-color-swatch {
|
||||
border: none;
|
||||
border-radius: calc(var(--rounded-corner-small) / 2);
|
||||
}
|
||||
|
||||
&::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&::-webkit-color-swatch {
|
||||
border-radius: calc(var(--rounded-corner-small) / 2);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user