From c9b49a0c3b809384760ab13dd969b03c38e02c65 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Thu, 23 Apr 2026 20:27:47 +0100 Subject: [PATCH 1/4] chore: use css inset instead of top and left 0 These mean the exact same thing when top and left are both set to 0, so it's just less CSS. --- src/components/HomepageFeatures/index.module.css | 3 +-- .../DocRoot/Layout/Sidebar/ExpandButton/styles.module.css | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/HomepageFeatures/index.module.css b/src/components/HomepageFeatures/index.module.css index 220381c8..0ae8cac1 100644 --- a/src/components/HomepageFeatures/index.module.css +++ b/src/components/HomepageFeatures/index.module.css @@ -25,8 +25,7 @@ .featureBackground::after { content: ""; - top: 0; - left: 0; + inset: 0; z-index: -1; height: 100%; width: calc(100vw - (100vw - 100%)); diff --git a/src/theme/DocRoot/Layout/Sidebar/ExpandButton/styles.module.css b/src/theme/DocRoot/Layout/Sidebar/ExpandButton/styles.module.css index f4cd944d..3118bf06 100644 --- a/src/theme/DocRoot/Layout/Sidebar/ExpandButton/styles.module.css +++ b/src/theme/DocRoot/Layout/Sidebar/ExpandButton/styles.module.css @@ -1,8 +1,7 @@ @media (min-width: 997px) { .expandButton { position: absolute; - top: 0; - right: 0; + inset: 0; width: 100%; height: 100%; display: flex; From c939c93be693cdf1e645491ed6456756fe8922c0 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Thu, 23 Apr 2026 20:28:30 +0100 Subject: [PATCH 2/4] chore: adopts function syntax instead of arrow function Literally just code-style. --- src/pages/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/index.jsx b/src/pages/index.jsx index a990b67b..6b282ed5 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -11,8 +11,8 @@ import styles from './index.module.css'; const INSTALL_COMMAND = 'npx svgo'; -const onClick = async () => { - navigator.clipboard.writeText(INSTALL_COMMAND); +function onClick() { + navigator.clipboard?.writeText(INSTALL_COMMAND); } function HomepageHeader() { From b5469169a15218e1d270b9c783c739bd1f99df67 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Thu, 23 Apr 2026 20:29:04 +0100 Subject: [PATCH 3/4] chore: moves spritesheet to root component instead of layout We were extending the wrong theme component to add globals. The Layout component remounts everything in it on each navigation, while the Root component actually achieves the desired behavior. In our case, it shouldn't have a significant impact on bundles or performance, but it's still following a better paradigm. --- src/theme/Layout/index.js | 12 ------------ src/theme/Root.jsx | 11 +++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 src/theme/Layout/index.js create mode 100644 src/theme/Root.jsx diff --git a/src/theme/Layout/index.js b/src/theme/Layout/index.js deleted file mode 100644 index 841735ef..00000000 --- a/src/theme/Layout/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import Layout from '@theme-original/Layout'; -import SpriteSheet from '../../components/SpriteSheet'; - -export default function LayoutWrapper(props) { - return ( - <> - - - - ); -} diff --git a/src/theme/Root.jsx b/src/theme/Root.jsx new file mode 100644 index 00000000..5d4ccc14 --- /dev/null +++ b/src/theme/Root.jsx @@ -0,0 +1,11 @@ +import React from 'react'; +import SpriteSheet from '../components/SpriteSheet'; + +export default function Root({ children }) { + return ( + <> + + {children} + + ); +} From a34a1e230a085c2e96247212ad36bcad60635cc0 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Thu, 23 Apr 2026 20:30:29 +0100 Subject: [PATCH 4/4] chore: removes redundant svg tag from svg --- src/vectors/logo.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vectors/logo.svg b/src/vectors/logo.svg index ea66cd8e..4ce071c3 100644 --- a/src/vectors/logo.svg +++ b/src/vectors/logo.svg @@ -1,5 +1,5 @@ - +