From 78dcb0a4b3860b443066213d0857a9c5f92b5549 Mon Sep 17 00:00:00 2001 From: Adam Kudrna Date: Fri, 25 Apr 2025 21:52:14 +0200 Subject: [PATCH 1/3] Tweak fonts in docs - Remove `:host` from `src/theme.scss` since all custom properties in component previews are inherited from root. - Remove redundant font requests and resource hints. - Minor component's README fixes. --- mkdocs.yml | 3 ++- src/components/Alert/README.md | 2 +- src/components/FormLayout/README.md | 13 +++++++------ src/components/InputGroup/README.md | 2 +- src/docs/_assets/stylesheets/extra.css | 17 +++++++---------- src/docs/_overrides/main.html | 2 -- src/theme.scss | 3 +-- 7 files changed, 19 insertions(+), 23 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 6c87a7896..130ef7dee 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -28,6 +28,7 @@ theme: name: material language: 'en' favicon: 'favicon.ico' + font: false custom_dir: 'src/docs/_overrides' palette: - media: "(prefers-color-scheme: light)" @@ -48,7 +49,7 @@ theme: extra_css: - https://unpkg.com/prismjs@1.29.0/themes/prism-twilight.min.css # Prism JS syntax highlighting - docs/_assets/stylesheets/extra.css # mkDocs theme tweaks - - docs/_assets/generated/docs-custom-properties.development.css # Load React UI CSS custom properties to make them accessible in the document root (outside shadowDOM) so we can preview colors etc. + - docs/_assets/generated/docs-custom-properties.development.css # Load React UI CSS custom properties to make them accessible in the document root (outside Shadow DOM), so we can set the root font size and preview colors and helpers/utilities. # Additional JS. Mind the order! extra_javascript: diff --git a/src/components/Alert/README.md b/src/components/Alert/README.md index d431f3fd5..5c3419b06 100644 --- a/src/components/Alert/README.md +++ b/src/components/Alert/README.md @@ -32,7 +32,7 @@ See [API](#api) for all available options. ## Color Variants To cover all possible needs of your project, Alert is available in colors from -[Feedback and Neutral color collections](/docs/foundation/collections#colors). +[Feedback color collection](/docs/foundation/collections#colors). ### Success diff --git a/src/components/FormLayout/README.md b/src/components/FormLayout/README.md index 7bacef204..53a081b99 100644 --- a/src/components/FormLayout/README.md +++ b/src/components/FormLayout/README.md @@ -300,7 +300,7 @@ This is a demo of all components supported by FormLayout. ```docoff-react-preview React.createElement(() => { - const [fieldLayout, setFieldLayout] = React.useState('vertical'); + const [fieldLayout, setFieldLayout] = React.useState('horizontal'); const [fruit, setFruit] = React.useState('apple'); const [isDeliveryAddress, setIsDeliveryAddress] = React.useState(true); const [receiveNewsletter, setReceiveNewsletter] = React.useState(true); @@ -323,16 +323,16 @@ React.createElement(() => { -