diff --git a/apps/website/src/components/LeftSidebarContent.astro b/apps/website/src/components/LeftSidebarContent.astro index c40199e7401..12477b6e1ba 100644 --- a/apps/website/src/components/LeftSidebarContent.astro +++ b/apps/website/src/components/LeftSidebarContent.astro @@ -84,13 +84,17 @@ sections.set( padding-top: var(--space-7); max-height: 100vh; min-width: 220px; - } - .nav-groups > li + li:not(.nav-link) { - margin-top: var(--space-5); + > li:last-of-type { + padding-block-end: var(--space-7); + } - @media (max-width: 50em) { - margin-top: var(--space-7); + > li + li:not(.nav-link) { + margin-top: var(--space-5); + + @media (max-width: 50em) { + margin-top: var(--space-7); + } } } diff --git a/apps/website/src/components/LiveExample.astro b/apps/website/src/components/LiveExample.astro index 512bdd25581..fd264a087de 100644 --- a/apps/website/src/components/LiveExample.astro +++ b/apps/website/src/components/LiveExample.astro @@ -34,6 +34,7 @@ if (code.includes('Copyright (c) Bentley Systems')) { className='demo-iui-wrapper' theme='dark' themeOptions={{ applyBackground: false }} + client:load > @@ -97,9 +98,10 @@ if (code.includes('Copyright (c) Bentley Systems')) { height: 100%; width: 100%; overflow: auto; - display: grid; + display: flex; + flex-direction: column; + justify-content: center; align-items: center; - justify-items: center; } .sandbox-link { diff --git a/apps/website/src/components/variables/ColorList.astro b/apps/website/src/components/variables/ColorList.astro index b177a7f1642..47c713e5462 100644 --- a/apps/website/src/components/variables/ColorList.astro +++ b/apps/website/src/components/variables/ColorList.astro @@ -1,35 +1,31 @@ --- -import ColorList from './ColorList'; -import '@itwin/itwinui-variables'; +import Wrapper from './_wrapper.astro'; +import ColorListR from './ColorList'; type Props = { colors: string[] | string[][] } & astroHTML.JSX.HTMLAttributes; const { colors, ...rest } = Astro.props; --- -
+ { Array.isArray(colors[0]) ? ( <> {colors.map((_colors) => ( - + ))} ) : ( - + ) } -
+ diff --git a/apps/website/src/components/variables/FontsDemo.astro b/apps/website/src/components/variables/FontsDemo.astro index 5b71eb3fb51..edc07ad612a 100644 --- a/apps/website/src/components/variables/FontsDemo.astro +++ b/apps/website/src/components/variables/FontsDemo.astro @@ -6,7 +6,7 @@ const { sizes, weights } = Astro.props; const howMany = sizes ? 6 : 4; --- - + { Array.from({ length: howMany }).map((_, i) => (

The quick brown fox jumped over the lazy dog

diff --git a/apps/website/src/components/variables/_wrapper.astro b/apps/website/src/components/variables/_wrapper.astro index df92e396311..1e9f5f3f772 100644 --- a/apps/website/src/components/variables/_wrapper.astro +++ b/apps/website/src/components/variables/_wrapper.astro @@ -1,4 +1,10 @@ -
+--- +import '@itwin/itwinui-variables'; + +const { class: className, ...props } = Astro.props; +--- + +
diff --git a/apps/website/src/demos/Alert.demo.tsx b/apps/website/src/demos/Alert.demo.tsx index 06eed899146..3f4900d86aa 100644 --- a/apps/website/src/demos/Alert.demo.tsx +++ b/apps/website/src/demos/Alert.demo.tsx @@ -8,12 +8,13 @@ import { Alert, ThemeProvider } from '@itwin/itwinui-react'; export default function AlertDemo() { return ( - console.log('CLOSED')} - clickableText='Learn more' - style={{ minWidth: 'min(100%, 280px)' }} - > - This is an alert + + + + This is an alert + console.log('Clicked more info!')}>Learn more + + console.log('CLOSED')} /> ); diff --git a/apps/website/src/pages/_global.astro b/apps/website/src/pages/_global.astro index 15ed6cbff0b..ff7f76a93f9 100644 --- a/apps/website/src/pages/_global.astro +++ b/apps/website/src/pages/_global.astro @@ -1,6 +1,7 @@ --- // This file should contain all the global styles and markup shared between layouts. +import '@itwin/itwinui-react/styles.css'; import HeadSEO from '~/components/HeadSEO.astro'; import MoveOnVisible from '~/components/utils/MoveOnVisible.astro'; import '@fontsource/noto-sans'; @@ -235,7 +236,7 @@ const { content = {} } = Astro.props; - + diff --git a/apps/website/src/pages/docs/_layout.astro b/apps/website/src/pages/docs/_layout.astro index a7989fdd751..f95c4cc779a 100644 --- a/apps/website/src/pages/docs/_layout.astro +++ b/apps/website/src/pages/docs/_layout.astro @@ -76,7 +76,6 @@ const currentPage = new URL(Astro.request.url).pathname; align-items: start; justify-content: center; padding: var(--space-7); - padding-block-end: calc(2 * var(--space-7)); grid-template: 'h1' auto 'toc' auto @@ -90,6 +89,13 @@ const currentPage = new URL(Astro.request.url).pathname; '. aftermain . toc' / 1fr var(--_content-width) 1fr auto; position: relative; + // using pseudo-element to work around firefox bug + &:global(::after) { + content: ''; + grid-row: aftermain-end; + padding-block-end: var(--space-7); + } + > :global(.toc-wrapper) { position: sticky; top: 0; diff --git a/apps/website/src/pages/index.astro b/apps/website/src/pages/index.astro index 1161ccb02aa..ff1e686eb44 100644 --- a/apps/website/src/pages/index.astro +++ b/apps/website/src/pages/index.astro @@ -1,5 +1,4 @@ --- -import '@itwin/itwinui-react/styles.css'; import Global from './_global.astro'; import Header from '~/components/Header.astro'; import ITwinUILogo from '~/components/iTwinUILogo';