Web Dev Solutions

Catalin Mititiuc

From 1935310fbf26769938a6e9a4008623c7b44fc5a8 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Sat, 23 Mar 2024 15:02:20 -0700 Subject: IT WORKS! 3-state selector with pure CSS! --- style.css | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/style.css b/style.css index 014ef85..93552b0 100644 --- a/style.css +++ b/style.css @@ -161,30 +161,31 @@ input:checked + label + input + label { border: none; display: inline; } +*/ input { position: absolute; opacity: 0; -} */ +} label span { - border-color: red; + display: none; } label:first-of-type span { - border-color: black; + display: inline-block; } label:has(input:checked) span { - border-color: red; + display: none; } label:has(+ label input:checked) span { - border-color: red; + display: none; } label:has(input:checked) + label span { - border-color: black; + display: inline-block; } image#img1 { -- cgit v1.2.3