@@ -2279,4 +2279,181 @@ html:not(.css-loading) body {
22792279 padding: 10px;
22802280 border: 1px dashed var(--color-border);
22812281 background-color: var(--color-background-secondary);
2282- } */
2282+ } */
2283+
2284+ .toggle-component-wrapper {
2285+ display : flex;
2286+ align-items : center;
2287+ /* margin: 0.5em; */
2288+ width : 100% ;
2289+ background-color : var (--color-background-secondary );
2290+ margin-bottom : 0.5em ;
2291+ /* padding: 6px 0; */
2292+ height : 100% ;
2293+ }
2294+
2295+ .toggle-label-container {
2296+ display : flex;
2297+ align-items : center;
2298+ margin-left : 4px ;
2299+ flex : 1 ;
2300+ min-width : 100px ;
2301+ /* background: red; */
2302+ font-weight : bold;
2303+
2304+
2305+ }
2306+
2307+ .toggle-label-container img .toggle-icon {
2308+ width : 1em ;
2309+ height : 1em ;
2310+ /* margin-right: 0.5em; */
2311+
2312+ }
2313+
2314+ .toggle-label-container .toggle-label {
2315+ /* font-size: 1em; */
2316+ white-space : nowrap;
2317+
2318+ }
2319+
2320+ .toggle-component {
2321+ position : relative;
2322+ /* flex-shrink: 0; */
2323+ /* padding: 0; */
2324+
2325+ /* background: blue; */
2326+ display : flex;
2327+ height : 100% ;
2328+ padding : 6px 0 ;
2329+ padding-left : 10px ;
2330+
2331+
2332+
2333+ }
2334+ .toggle-component : hover {
2335+ cursor : pointer;
2336+ background-color : var (--color-background );
2337+ }
2338+ .toggle , .toggle : before , .slot__label , .curtain {
2339+ transition-property : background-color, transform, visibility;
2340+ transition-duration : 0.25s ;
2341+ transition-timing-function : ease-in, cubic-bezier (0.6 , 0.2 , 0.4 , 1.5 ), linear;
2342+
2343+ }
2344+ .toggle : before , .slot , .slot__label {
2345+ display : block;
2346+
2347+ }
2348+ .toggle : before , .curtain {
2349+ position : absolute;
2350+
2351+ }
2352+
2353+ .toggle : checked , .curtain {
2354+
2355+ }
2356+
2357+ .toggle : focus {
2358+ outline : transparent;
2359+
2360+ }
2361+
2362+ .toggle {
2363+ width : 0.9em ;
2364+ height : 1em ;
2365+ border-radius : 50% ;
2366+ -webkit-appearance : none;
2367+ -moz-appearance : none;
2368+ appearance : none;
2369+ -webkit-tap-highlight-color : transparent;
2370+ vertical-align : middle;
2371+ /* margin-right: 0.15em; */
2372+ /* Start as a hollow circle to simulate no "O" when off */
2373+ background : transparent;
2374+ border : 0.25em solid var (--color-primary-text );
2375+ position : relative;
2376+ cursor : pointer;
2377+ user-select : none;
2378+ vertical-align : middle;
2379+
2380+ }
2381+
2382+ .toggle : before {
2383+ content : none;
2384+ }
2385+
2386+ .toggle : checked {
2387+ /* background: #2b7f3a; */
2388+ /* border-color: #2b7f3a; */
2389+ /* background: transparent; */
2390+ border-color : var (--color-button-secondary-text );
2391+
2392+ }
2393+
2394+ .slot {
2395+ display : inline-block;
2396+ vertical-align : middle;
2397+ font-size : 17px ;
2398+ /* letter-spacing: 0.2em; */
2399+ line-height : 1em ;
2400+ overflow : hidden;
2401+ height : 1em ;
2402+ /* text-indent: -0.8em; */
2403+ /* -webkit-text-stroke: 0.03em #fff; */
2404+ user-select : none;
2405+ font-weight : bold;
2406+ padding-right : 6px ;
2407+ color : var (--color-primary-text );
2408+ }
2409+
2410+ .slot__label {
2411+ transform-origin : 50% 0 ;
2412+ /* color: red; */
2413+ /* background: green; */
2414+ letter-spacing : 0.2em ;
2415+ line-height : 0.8em ;
2416+ overflow : hidden;
2417+ height : 1em ;
2418+ text-indent : -0.8em ;
2419+
2420+
2421+ }
2422+
2423+ .slot__label : nth-child (2 ) {
2424+ transform-origin : 50% 100% ;
2425+ }
2426+
2427+ .toggle : checked ~ .slot .slot__label {
2428+ transform : translateY (-50% ) scaleY (0 );
2429+ color : var (--color-button-secondary-text );
2430+
2431+ }
2432+
2433+ .toggle : checked ~ .slot .slot__label : nth-child (2 ) {
2434+ transform : translateY (-100% ) scaleY (1 );
2435+ }
2436+ .curtain {
2437+ transform : scaleX (0 );
2438+ transform-origin : 0 50% ;
2439+ z-index : -1 ;
2440+ width : 100% ;
2441+ height : 100% ;
2442+ top : 0 ;
2443+ left : 0 ;
2444+ }
2445+
2446+
2447+ .toggle : checked ~ .curtain {
2448+ transform : scaleX (1 );
2449+ }
2450+
2451+ @media (max-width : 600px ) {
2452+ .toggle-component-wrapper {
2453+ max-width : 100% ;
2454+ }
2455+ .toggle-label-container {
2456+ flex : none;
2457+ min-width : 80px ;
2458+ }
2459+ }
0 commit comments