2021-05-03 17:39:58 +00:00
|
|
|
@layer components {
|
|
|
|
.form-input-tabs > input[type="radio"] {
|
|
|
|
@apply absolute -left-full;
|
|
|
|
}
|
|
|
|
|
|
|
|
.form-input-tabs .tab-panel {
|
|
|
|
@apply hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Logic for 2 tabs at most */
|
|
|
|
.form-input-tabs
|
|
|
|
> input:first-child:checked
|
|
|
|
~ .tab-panels
|
|
|
|
> .tab-panel:first-child,
|
|
|
|
.form-input-tabs
|
|
|
|
> input:nth-child(3):checked
|
|
|
|
~ .tab-panels
|
|
|
|
> .tab-panel:nth-child(2) {
|
|
|
|
@apply block;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Styling */
|
|
|
|
.form-input-tabs > label {
|
|
|
|
@apply relative inline-block px-1 py-2 text-xs text-center cursor-pointer opacity-70 hover:opacity-100;
|
|
|
|
}
|
|
|
|
|
2021-11-05 14:36:34 +00:00
|
|
|
.form-input-tabs > input:focus + label {
|
|
|
|
@apply ring-accent;
|
|
|
|
}
|
|
|
|
|
2021-05-03 17:39:58 +00:00
|
|
|
.form-input-tabs > input:checked + label::after {
|
2021-11-05 14:36:34 +00:00
|
|
|
@apply absolute inset-x-0 bottom-0 w-full mx-auto bg-accent-base;
|
2023-06-08 14:42:32 +00:00
|
|
|
|
2021-05-03 17:39:58 +00:00
|
|
|
content: "";
|
|
|
|
height: 0.2rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.form-input-tabs > input:checked + label {
|
2021-11-05 14:36:34 +00:00
|
|
|
@apply font-semibold opacity-100 text-accent-base;
|
2021-05-03 17:39:58 +00:00
|
|
|
}
|
|
|
|
}
|