Files
CSS-NibblePoker/scss/site/input.scss
Herwin Bozet 0739af9259 Added radio input styles, improved SASS for checkboxes and radios
Update inputs.php, inputs.php, and 2 more files...
2025-08-24 18:15:22 +02:00

221 lines
3.5 KiB
SCSS

// NibblePoker CSS Theme - CC0 1.0 (Public Domain)
/* Site > Elements > Inputs */
/* Site > Elements > Inputs > Commons */
button, input, textarea, select {
border: 0;
// Removing ugly-ass white glow when editing text-related inputs.
// Shit looks straight out of winforms in 2023...
outline: none;
color: #{$color-text-inputs};
background-color: #{$color-background-inputs};
&:not(.no-focus) {
&:focus {
box-shadow: 0px 0px 3px 0px #{$color-input-glow};
}
}
&:disabled {
cursor: not-allowed;
}
}
label {
cursor: pointer;
user-select: none;
}
/* Site > Elements > Inputs > Checkbox & Radio */
input[type=checkbox], input[type=radio] {
width: 1.65em;
height: 1.65em;
background-color: #{$color-background-checkbox-unchecked};
cursor: pointer;
&:checked {
background-color: #{$color-background-checkbox-checked};
}
position: relative;
vertical-align: middle;
}
input[type="checkbox"] + label, input[type="radio"] + label {
position: relative;
display: inline-block;
vertical-align: middle;
}
/* Site > Elements > Inputs > Checkbox */
input[type=checkbox] {
&.cb-pretty, &.checkbox-pretty {
text-align: center;
padding: 0;
&:before {
content: "";
}
&:checked {
&:before {
content: "";
}
}
}
}
/* Site > Elements > Inputs > Radio */
input[type=radio] {
border-radius: 50%;
&.radio-solid, &.radio-3d {
text-align: center;
padding: 0;
&:before {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60%;
height: 60%;
border-radius: 50%;
background-color: transparent;
border-color: white;
}
&:checked {
&:before {
background-color: white;
}
}
}
&.radio-solid {
&:before {
border-style: double;
border-width: 2px;
}
}
&.radio-3d {
&:before {
border-style: inset;
border-width: 2px;
}
&:checked {
&:before {
border-style: outset;
}
}
}
}
/* Site > Elements > Inputs > Buttons */
button {
cursor: pointer;
background-color: #{$color-background-button};
&:hover {
background-color: #{$color-background-button-hover};
}
&.btn-primary {
background-color: #{$color-background-button-primary};
&:hover {
background-color: #{$color-background-button-primary-hover};
}
}
&.btn-success {
background-color: #{$color-background-button-success};
&:hover {
background-color: #{$color-background-button-success-hover};
}
}
&.btn-error {
background-color: #{$color-background-button-error};
&:hover {
background-color: #{$color-background-button-error-hover};
}
}
&.btn-warning {
background-color: #{$color-background-button-warning};
&:hover {
background-color: #{$color-background-button-warning-hover};
}
}
}
// Ugly fix for download buttons
button + button, .button-link + .button-link > button {
margin-left: 0.75rem;
}
/* Site > Elements > Inputs > Lang Selector */
#lang-selector {
position: relative;
white-space: nowrap;
> summary {
cursor: pointer;
list-style: none;
user-select: none;
}
> div {
position: absolute;
z-index: #{$z-index-lang-dropdown};
top: 2rem;
right: 0;
min-width: 100%;
// Visibility transition
//height: 0;
//transition: height 0.4s;
//transition-timing-function: cubic-bezier(.25,.8,.25,1.1);
}
// TODO: Maybe force it to be visible when closes ?
//&[open] > div {
// height: auto;
//}
}
// TODO: Move to core !
.ta-resize {
resize: both;
}
.ta-resize-h {
resize: horizontal;
}
.ta-resize-v {
resize: vertical;
}
.ta-resize-none {
resize: none;
}