Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(www): Add brand guidelines, design tokens docs (humble beginning…
…s) (gatsbyjs#14360) * Basic port of https://mutability.netlify.com/ A humble first shot at documenting our brand guidelines, providing a place for people to find our logo, and document the design tokens used to create our OSS website UI. Prior work shipped to mutability.netlify.com used https://styled-system.com/ under the hood. I really enjoyed working with it, but using it for .org `www` of course should be thoroughly discussed. I’m including it here to facilitate a discussion, …and to ship things! ;-) - consolidate prior work with existing .org `www` design tokens - add a breakpoint `xxs`, required to make styled-system’s https://styled-system.com/responsive-styles work - add rudimentary `colors.blackFade` and `colors.whiteFade` - extend `tokens/font-sizes`, now generated via a formula that outputs (device) pixel values; generated values are manually adjusted, then converted to `rem` in `utils/presets` - update link to mutability.netlify.com on `/contributing/organize-a-gatsby-event` to point to `/guidelines/logo/` - add an item „Logo & Assets“ to the global footer, linking to `/guidelines/logo/` - add `presets.fontWeights` - add `presets.borders` The original PoC implementation also makes use of `react-spring` and `react-visibility-sensor` to add some „text highlighting“ animations, and uses `react-copy-to-clipboard` and the `color` package to facilitate UI behavior and various calculations for the „Color“ part of the guidelines. I’m not opposed to remove the animations — they don’t add much — but might need some help in dropping the `color` lib if we want to get that dep out of the bundle. Noob alert! ;-) Oh, `react-copy-to-clipboard` probably should go, too. Unfortunately we still didn’t settle on anything reusable. — Wether we go for `styled-system` or not, we should think about using `emotion`’s context/`emotion-theming` moving forward. No need to explicitly import stuff esp. now that refactoring things have settled down. I recall @jxnblk saying there are treeshaking/bundle size benefits to not doing so, though. — Todo: - fix/expand „Color“ data, content and UI - fix missing color swatches for black and white on the „Logo“ page - add `letterSpacing`, `lineHeights`, `fontWeights` token documentation to „Typography“, tidy examples here and there - add partner logo lockup guide to „Logo“ - give the copy a very close second look - lots more in and out of scope for this PR :-P — will follow up on that * @styled-system/should-forward-prop * Content * Remove <Annotation>, <Words> * No need for custom badge * Remove „Logo“ masthead background * Rm Spectral * Copy * Callout styles * Add radii * teal -> orange * Tidy * Basic fixes for „Copy HEX“ tooltip * Copy, hierarchy * Bump styled-system to v4.2.4 * Wrap up `shadows`; no need to put in more work here right now * Fix nav item active state 🙏 @jxnblk * Betterer?! :P * Fix „Logo“ <ColorSwatch> * Expand „Color Blindness“ section * Remove a bunch of „Purple“ color names * Reorder footer links * Nicer „Footnotes“ links * Add Futura PT Bold, make it the default for <h1> * Basic improvements to the color modal * More whitespace in between content columns * Various <h1> fixes, add+use tokens/font-weights * Add first shot at partnership lockup * Rm textRendering:optimizeLegibility, we do this globally already * Let it breathe ;) * Fix a couple more stray `fontWeight`s * Buttons * Fix buttons * Mv placeholder.js -> image-placeholder.js * Mv navigation.js -> nav.item.js * Simpler * Fix Pantone link text color * Date * Rinse * Add letter-spacing docs, rm letterSpacings.mega * Various cleanup - fix avatar size - nicer `fontTokens` join to improve readability of the generated `font-family` value - modify `fonts.header`, no need to repeat the system font stack - Typography - add „Line Heights“ docs - tidy examples - Design Tokens - add reference to the System UI Theme Specification - add reference to styled-system - improve „Shadows & Elevation“ layout - add docs for „Fonts“, „Font Sizes“, „Line Heights“ - Color - minor copy improvements - fix color overview layout - add WCAG contrast radio „legend“ * Fix tab-ability of color copy button * <th scope=„col“> * Fix markup, DRY * Fix keys * Add color code to copy button label Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/assets/guidelines/wordmark.svg Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/assets/guidelines/clearspace.svg Prevent SVGs from being focusable in IE Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVGs from being focusable in IE Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVGs from being focusable in IE Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Render main content as <main> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Fix d'oh Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/pages/guidelines/logo.js Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Mention design tokens in `www` README * Copy d'oh Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Fix color contrast * Rm yellow background for „Scale“. A11y FTW! * Bump color contrast * Add basic <Helmet> stuff (title, html lang, canonical link, OG, Twitter site) * Render as <ul> * Add screenreader-only text describing the PMS link * One more focusable="false" * Fix ecosystem card title font-weight * Change `<div>` to `<section>` to allow `<h1>` * Don’t show HEX color value when focussing copy button * Fix copy button hover; minor UI fixes * Full-width `font-sizes` tokens * Small screen <3 * Add screenreader-only text that describes `space` and `border-radius` examples * Change container tag to `section` to be able to use `<h1>` * chore: format * Add breakpoints+mediaQueries, colors, letterSpacings to „Design Tokens“ * Lowercase * Add system font stack back to fonts.header * Bring back focusable=„false“ via SVGO plugin * Try * chore: format * Rm `data-image: icon` * Lint * Add zIndices, fontWeights, transitions * Fix internal link * Screenreader-only text for the „Colors“ design token examples * Drop `color` dep …in favor of `color-blend`, `wcag-contrast`, `hex-rgb`. Saves us a couple bytes of overhead. Along the way: - expand `blackFade`, `whiteFade` - fix `blackFade` base color - update "white or black text on colored background" examples in the color modal: - now all values from the `blackFade`/`whiteFade` that pass the WCAG color contrast ratio will be rendered (as opposed to a generic set of text colors ("High/medium emphasis", "Disabled") without any a11y information) - using `color-blend` to blend `rgba` values with the background color; scores very similar, but not exactly the same as on https://contrast-ratio.com/ - simplify the (very simple) inverted theme - fix palette meta information - fix aliases * Doc * Clearer "Color" modal links <3 @amberleyromo * Last minute fixes Thank you @amberleyromo for teaching me how to spell. * Navigate to `/guidelines/logo/` when right-clicking Gatsby logo in header I smell a11y issues TBH. Paging @marcysutton! /cc @DSchau @KyleAMathews * Bump to styled-system v5 🎉 * Rm `themed` * Revert "Navigate to `/guidelines/logo/` when right-clicking Gatsby logo in header" This reverts commit 3c47ad1. * Use `themes.sizes.avatar` to define avatar dimensions * Update Futura PT Bold font - licensed for up to 2,000,000 page views - added `font-display: swap` * Rm link in footer Let's go "dark deploy" (as discussed with @KyleAMathews) * Change "WCAG Contrast Score" from <h4> to <h3> * Add `aria-label` for color modal close button * Add `title` to button that opens the modal * Rm unused import * Add `aria-label` to color swatch buttons * Add HEX color value to swatch "copy" tooltip * Lint
- Loading branch information