You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f563a77
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: services/site/DESIGN.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,12 +72,14 @@ To add a rule, add one line under its group. Mark a rule that is still being dec
72
72
- Use `component/faq.tsx` for every accordion. → [Accordion](/dev/components#faq)
73
73
- Every dropdown uses the shared Dropdown component; no one-off menus. On the site that is `SiteMenu` (`component/site/site-menu.tsx`), which brings the shared menu look, keyboard support and the phone sheet.
74
74
- Open every dropdown with `placeMenu` (`component/site/place-menu.ts`; SiteMenu already does). It opens below the trigger, above only when below has no room, and in the top layer, so a scrolling box such as the carousel never cuts it off.
75
+
- A dropdown that opens from a button with an icon starts at the button's inline-start edge, and its row icons and labels sit exactly under the button's icon and label (within 0.5px; mirrored in RTL). Set the rows' inset and gap from the button's own tokens (`--icon-inset`, `--icon-gap` in `site.css`), never per menu. Phone bottom sheets are not anchored to the button, so they don't follow this. → [Split button](/dev/components#split-button)
75
76
- Turn dropdowns into the shared bottom sheet (`sheet.tsx`) on touch phones. → [Bottom sheet](/dev/components#sheet)
76
77
- Give long pages the Contents rail (`OnThisPage`) and its phone bar (`ContentsMenu`). → [Contents](/dev/components#contents)
77
78
- Draw breadcrumbs with muted ancestors, `|` separators and the current page in ink. → [Breadcrumbs](/dev/components#breadcrumb)
78
79
- Confirm copy actions in place ("Copied") through a live region; the site has no toasts. → [Copy buttons](/dev/components#copy-buttons)
79
80
- On docs pages, the left nav's first item, the content's first item and the right rail's first item share one top line (text tops for the nav and the title, the box top for the search box).
80
81
- A sidebar that scrolls under fixed chrome (the docs nav under the logo and lockup) fades out at its edges with a mask, only while items are under that edge; phones keep hard cuts on sticky bars.
82
+
- Beside the sidebar, the OpenCode logo and the lockup beside it (DOCS) never move: fixed in the top-left corner at the same place on every page, at rest and scrolled. Whatever passes under them (a sidebar leaving with the article at the page's end) fades out under a strip of the page colour, shown only while something is under it. Phones keep their top bar.
81
83
- No flat greys inside callouts or other tinted surfaces; grey layers blend with the surface (mix-blend-mode), except code and table bodies, which stay solid. → [Code inside callouts](/dev/docs-components#blend)
82
84
- Code blocks and tables inside a tinted surface blend their header and borders with mix-blend-mode, so they take the surface's hue; code and table bodies stay solid, on the code body colour. → [Code inside callouts](/dev/docs-components#blend)
83
85
- Docs code blocks copy with a text-only button in the header: "Copy" turns to "Copied" (or "Failed"), right-aligned in the width of the longest label so nothing moves. → [Code blocks](/dev/docs-components#code-blocks)
Copy file name to clipboardExpand all lines: services/site/src/component/site/docs-lockup.css
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -384,18 +384,15 @@
384
384
385
385
/* Every interactive segment of the lockup (the section word, its chevron, the combined trigger and
386
386
the version) shares one set of states, as the Data and Console product names do
387
-
(public/nav-demo/switcher.css): hover fills with the logo's inner square beside it (--logo-inner,
388
-
site.css) with the text at full strength, pressed and open one step further from the page, and a
389
-
2px ring for the keyboard. Neutral grey whatever Settings › Menu color. The visible fill is the
387
+
(public/nav-demo/switcher.css): hover fills with half the logo's inner square beside it
388
+
(--logo-inner, site.css) over the page, with the text at full strength; pressed and open take the
389
+
full inner-square colour, the next step from the page; and a 2px ring for the keyboard. Neutral grey whatever Settings › Menu color. The visible fill is the
390
390
logo mark's height (the lockup row is the mark's height and top); a transparent ::before keeps
391
391
each hit area 32px tall beside the sidebar and 44px for touch. The separator isn't interactive. */
Copy file name to clipboardExpand all lines: services/site/src/component/site/github-link.css
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/* The GitHub mark (site.tsx): the mark in the primary ink, the 40px circle round it the link. Beside the sidebar it is fixed in the top-right corner, centred on the logo row
2
-
and on the same vertical axis as the voice orb in the bottom-right corner; on small screens it
2
+
and as far from the right edge as from the top; on small screens it
3
3
sits in the top bar, left of the menu button. Bare pages (the font page) have no top bar, so
0 commit comments