From 59f81e6490c18ce6d0e9877871539eb79c44958f Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 8 Dec 2021 18:13:43 +0800 Subject: [PATCH] fix(core): fix error boundary import disrupting CSS order (#6052) --- .../src/theme/AnnouncementBar/styles.module.css | 4 ++-- packages/docusaurus/src/client/App.tsx | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/styles.module.css b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/styles.module.css index a357446eb75d..74969ee6515c 100644 --- a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/styles.module.css +++ b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/styles.module.css @@ -29,8 +29,8 @@ html[data-announcement-bar-initially-dismissed='true'] .announcementBar { .announcementBarClose { flex: 0 0 30px; align-self: stretch; - padding: 0 !important; - line-height: 0 !important; + padding: 0; + line-height: 0; } .announcementBarContent { diff --git a/packages/docusaurus/src/client/App.tsx b/packages/docusaurus/src/client/App.tsx index 4082be154efc..48a78adfe47a 100644 --- a/packages/docusaurus/src/client/App.tsx +++ b/packages/docusaurus/src/client/App.tsx @@ -11,14 +11,16 @@ import routes from '@generated/routes'; import renderRoutes from './exports/renderRoutes'; import {BrowserContextProvider} from './exports/browserContext'; import {DocusaurusContextProvider} from './exports/docusaurusContext'; -import ErrorBoundary from '@docusaurus/ErrorBoundary'; import PendingNavigation from './PendingNavigation'; import BaseUrlIssueBanner from './baseUrlIssueBanner/BaseUrlIssueBanner'; import Root from '@theme/Root'; -import Error from '@theme/Error'; import './client-lifecycles-dispatcher'; +// TODO, quick fix for CSS insertion order +import ErrorBoundary from '@docusaurus/ErrorBoundary'; +import Error from '@theme/Error'; + function App(): JSX.Element { return (