DK2/public/assets/css/forms.css

127 lines
2.6 KiB
CSS
Raw Normal View History

2024-10-03 12:02:32 -05:00
.form.control {
appearance: none;
outline: none;
display: block;
width: 100%;
2024-10-05 14:23:32 -05:00
padding: 0.5rem;
color: white;
background-color: rgba(0, 0, 0, 0.2);
border: 1px solid transparent;
2024-10-03 12:02:32 -05:00
border-radius: 4px;
2024-10-05 14:23:32 -05:00
box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.1);
font-size: 1rem;
2024-10-05 14:23:32 -05:00
&::placeholder {
color: rgba(255, 255, 255, 0.7);
}
2024-10-05 14:23:32 -05:00
&:hover {
background-color: rgba(0, 0, 0, 0.3);
}
2024-10-05 14:23:32 -05:00
&:focus {
background-color: rgba(0, 0, 0, 0.5);
border-color: rgba(0, 0, 0, 0.8);
}
2024-10-05 14:23:32 -05:00
&.error {
background-color: rgba(255, 43, 43, 0.2);
2024-10-05 14:23:32 -05:00
&:hover {
background-color: rgba(255, 43, 43, 0.3);
}
2024-10-05 14:23:32 -05:00
&:focus {
background-color: rgba(255, 43, 43, 0.3);
border-color: rgba(255, 43, 43, 0.8);
}
}
}
2024-10-05 14:23:32 -05:00
.form.group {
margin-bottom: 1rem;
& > label {
display: block;
2024-10-05 14:23:32 -05:00
margin-bottom: 0.5rem;
}
2024-10-05 14:23:32 -05:00
& > .form.control:not(:last-child) {
margin-bottom: 0.5rem;
}
}
.character-select > .radio-block {
display: inline-block;
background-color: rgba(0, 0, 0, 0.2);
border-radius: 0.15rem;
&:not(:last-child) {
margin-bottom: 0.25rem;
}
& > input[type="radio"] {
display: none;
}
& > label {
display: flex;
align-items: center;
width: 100%;
border-radius: 0.15rem;
cursor: pointer;
2024-10-05 14:23:32 -05:00
transition: color, background-color, border-color, background-image 0.2s ease;
padding: 0.5rem;
2024-10-05 14:23:32 -05:00
border: 1px solid transparent;
background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0));
&:hover {
2024-10-05 14:23:32 -05:00
background-color: rgba(0, 0, 0, 0.3);
color: white;
}
& > .badge {
margin-left: 0.25rem;
}
2024-10-05 14:23:32 -05:00
& > span.selected {
display: none;
margin-left: 1rem;
2024-10-05 14:23:32 -05:00
color: #a6e3a1;
}
}
&.active > label {
2024-10-05 14:23:32 -05:00
background-color: #444c55;
color: #ffffff;
background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.1));
border: 1px solid;
border-color: #3D444C #2F353B #2C3137;
box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
& > span.selected {
display: inline-block;
}
}
/* When the radio button is checked, change the background color of the label */
& > input[type="radio"]:checked + label {
background-color: #f4cc67;
2024-10-05 14:23:32 -05:00
background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.1));
box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
color: #111111;
2024-10-05 14:23:32 -05:00
border: 1px solid;
border-color: #C59F43 #AA8326 #957321;
}
/* When the radio button is disabled, show a normal cursor */
& > input[type="radio"]:disabled + label {
cursor: default;
}
}
2024-10-05 14:23:32 -05:00
/* If there is no character selected, hide the buttons */
.character-select:not(:has(input[type="radio"]:checked)) > .buttons {
display: none;
}