From 0693b01c6ef9195e2de5c85fe71bd22b6e03d349 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Mon, 29 Apr 2024 09:06:04 -0700 Subject: [PATCH] chore: deps + css nesting --- package-lock.json | 16 +++---- src/assets/styles/components/menu.css | 64 ++++++++++++++------------- 2 files changed, 42 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 83dcfc5d..1702139e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "12.9.11", + "version": "13.1.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "12.9.11", + "version": "13.1.7", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.2.2", @@ -1746,9 +1746,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001613", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001613.tgz", - "integrity": "sha512-BNjJULJfOONQERivfxte7alLfeLW4QnwHvNW4wEcLEbXfV6VSCYvr+REbf2Sojv8tC1THpjPXBxWgDbq4NtLWg==", + "version": "1.0.30001614", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz", + "integrity": "sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog==", "dev": true, "funding": [ { @@ -5570,9 +5570,9 @@ } }, "node_modules/terser": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.4.tgz", - "integrity": "sha512-xRdd0v64a8mFK9bnsKVdoNP9GQIKUAaJPTaqEQDL4w/J8WaW4sWXXoMZ+6SimPkfT5bElreXf8m9HnmPc3E1BQ==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", + "integrity": "sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", diff --git a/src/assets/styles/components/menu.css b/src/assets/styles/components/menu.css index 1b5089dd..3c2db4b4 100644 --- a/src/assets/styles/components/menu.css +++ b/src/assets/styles/components/menu.css @@ -29,45 +29,49 @@ theme-toggle { .menu-button-container { display: none; + + & .menu-open, + & .menu-closed { + cursor: pointer; + } + + & svg { + transform: rotate(0deg); + transition-property: transform; + transition-timing-function: var(--transition-ease-in-out); + transition-duration: var(--transition-duration-default); + } + + & svg:hover, + & svg:active, + & svg:focus { + stroke: var(--accent-color-hover); + transform: rotate(8deg); + } } #menu-toggle { display: none; } -.menu-button-container .menu-open, -.menu-button-container .menu-closed { - cursor: pointer; +#menu-toggle:checked + .menu-button-container { + & .menu-closed { + display: none; + } + + & .menu-open { + display: block; + } } -.menu-button-container svg { - transform: rotate(0deg); - transition-property: transform; - transition-timing-function: var(--transition-ease-in-out); - transition-duration: var(--transition-duration-default); -} +#menu-toggle:not(:checked) + .menu-button-container { + & .menu-closed { + display: block; + } -.menu-button-container svg:hover, -.menu-button-container svg:active, -.menu-button-container svg:focus { - stroke: var(--accent-color-hover); - transform: rotate(8deg); -} - -#menu-toggle:checked + .menu-button-container .menu-closed { - display: none; -} - -#menu-toggle:checked + .menu-button-container .menu-open { - display: block; -} - -#menu-toggle:not(:checked) + .menu-button-container .menu-closed { - display: block; -} - -#menu-toggle:not(:checked) + .menu-button-container .menu-open { - display: none; + & .menu-open { + display: none; + } } @media (max-width: 768px) {