Blender's GPU Accelerated UI, Decoupled from it's original codebase. Supports Rust, Python, JS, React, C & C++. Twice as good as GPUI
chore: fix website ui
Preetham Pemmasaniddc9040ab92a
diff --git a/website/src/components/docs/Tabs.astro b/website/src/components/docs/Tabs.astroindex fb5d430..8c4af78 100644--- a/website/src/components/docs/Tabs.astro+++ b/website/src/components/docs/Tabs.astro@@ -13,9 +13,11 @@ interface Props {sync?: string;/** Accessible name for the tab list, e.g. "Language". */label?: string;+ /** Just the tab strip: no box around the panels, which keep the page's own width and spacing. */+ bare?: boolean;}-const { sync, label = "Choose one" } = Astro.props;+const { sync, label = "Choose one", bare = false } = Astro.props;const html = await Astro.slots.render("default");const labels = [...html.matchAll(/data-tab-label="([^"]*)"/g)].map((m) => m[1]);@@ -31,8 +33,8 @@ const decode = (s: string) =>s.replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");----<div class="tabs border border-border" data-tabs data-sync={sync}>- <div role="tablist" aria-label={label} class="flex overflow-x-auto border-b border-border bg-surface [scrollbar-width:none]">+<div class:list={["tabs", bare ? "tabs-bare" : "border border-border"]} data-tabs data-sync={sync}>+ <div role="tablist" aria-label={label} class:list={["flex overflow-x-auto border-b border-border [scrollbar-width:none]", bare ? "mb-6" : "bg-surface"]}>{labels.map((l, n) => (<button@@ -50,7 +52,7 @@ const decode = (s: string) =>))}</div>- <div class="tab-panels" set:html={panels} />+ <div class:list={["tab-panels", bare && "is-bare"]} set:html={panels} /></div><style>@@ -59,7 +61,16 @@ const decode = (s: string) =>font-size: 0.9375rem;line-height: 1.7;}- .tab-panels :global([data-tab-panel] > * + *) {+ .tab-panels.is-bare :global([data-tab-panel]) {+ padding: 0;+ font-size: inherit;+ line-height: inherit;+ }+ /* a bare panel sits in the page's prose: the same spacing, with zero specificity so headings keep theirs */+ :global(:where(.tab-panels.is-bare [data-tab-panel] > * + *)) {+ margin-top: 1.15rem;+ }+ .tab-panels:not(.is-bare) :global([data-tab-panel] > * + *) {margin-top: 0.9rem;}.tab-panels :global([data-tab-panel]:focus-visible) {diff --git a/website/src/content/docs/performance/benchmarks.mdx b/website/src/content/docs/performance/benchmarks.mdxindex 542043b..2ae68c6 100644--- a/website/src/content/docs/performance/benchmarks.mdx+++ b/website/src/content/docs/performance/benchmarks.mdx@@ -9,7 +9,7 @@ sources: ["README.md", "bindings/rust/bench/README.md", "docs/javascript.md", "bBUI is fast where it matters to people: it opens quickly, it sits at zero CPU while you're not touching it, and it stays smooth when thousands of things move. Here are the numbers, with everything you need to judge them.-<Tabs sync="os" label="Operating system">+<Tabs sync="os" label="Operating system" bare><Tab label="Windows"><Callout type="warning" title="Where these numbers come from">diff --git a/website/src/styles/charts.css b/website/src/styles/charts.cssindex 53d79c4..c0d9e2f 100644--- a/website/src/styles/charts.css+++ b/website/src/styles/charts.css@@ -31,8 +31,8 @@.chart-bar {position: absolute;inset: 0 auto 0 0;- /* the longest bar takes two thirds of the track, so every value label fits after it */- width: calc(var(--p) * var(--scale, 0.66));+ /* the longest bar takes 58% of the track, so every value label fits after it */+ width: calc(var(--p) * var(--scale, 0.58));min-width: 2px;background-color: var(--c, var(--chart-other));transform-origin: left center;@@ -44,7 +44,7 @@.chart-value {position: absolute;top: 50%;- left: calc(var(--p) * var(--scale, 0.66) + 0.5rem);+ left: calc(var(--p) * var(--scale, 0.58) + 0.5rem);transform: translateY(-50%);display: inline-flex;align-items: baseline;