-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(www): Add gatsby-plugin-theme-ui, dark theme MVP #18027
Conversation
# Conflicts: # www/src/components/code-block/index.js # www/src/utils/typography.js
# Conflicts: # www/src/components/copy.js # www/src/utils/copy-to-clipboard.js
# Conflicts: # www/src/assets/icons/svg-defs.js # www/src/components/diagram.js # www/src/components/evaluation-table-section-header-bottom.js # www/src/components/evaluation-table.js # www/src/components/homepage/homepage-features.js # www/src/components/navigation-mobile.js # www/src/components/navigation.js # www/src/components/used-by.js # www/src/pages/plugins.js # www/src/views/showcase/featured-sites.js
# Conflicts: # www/src/components/container.js # www/src/templates/template-blog-post.js # www/src/utils/presets.js # www/src/utils/typography.js
# Conflicts: # www/package.json # www/src/pages/blog/tags.js # www/src/templates/tags.js # www/src/templates/template-blog-list.js # www/src/templates/template-docs-markdown.js # www/wrap-root-element.js
# Conflicts: # packages/gatsby-design-tokens/src/colors.js # www/package.json # www/src/components/chart.js # www/src/components/docs-table-of-contents.js # www/src/components/evaluation-cell.js # www/src/components/evaluation-table-section-header-bottom.js # www/src/components/features/evaluation-table-section-header-top.js # www/src/components/features/evaluation-table-section-title.js # www/src/components/features/evaluation-table.js # www/src/components/layout.js # www/src/components/navigation-mobile.js # www/src/components/plugin-searchbar-body.js # www/src/components/search-form.js # www/src/components/sidebar/accordion.js # www/src/components/sidebar/section-title.js # www/src/components/sidebar/sticky-responsive-sidebar.js # www/src/pages/features.js # www/src/templates/template-blog-list.js # www/src/templates/template-blog-post.js # www/src/templates/template-creator-details.js # www/src/utils/sidebar/create-link.js # www/src/views/shared/styles.js # www/src/views/shared/thumbnail.js # www/src/views/showcase/featured-sites.js # www/src/views/showcase/showcase-list.js
# Conflicts: # www/src/utils/typography.js
Wow! |
Preview (with a subset of "Showcase" sites): |
# Conflicts: # www/src/templates/template-blog-post.js
@fk If I may, I've noticed on the deployed site that the moon/sun icon isn't aligned with the other icons in the header
I think it has something to do with varying sizes of the icons. |
@johnletey Sure you may! Thank you for taking the time! 🤗
Thanks for calling that out, the switch button needs a little nudge indeed! 🙏 |
Thanks again @johnletey for pointing this out! 🤗 This also fixes the `MoonMask" animation, brings back the default `:focus` outline, and roughly compensates for the additional whitespace of this "icon button" in relation to its "social icon" siblings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dark mode 🎉🌃🌟 As you noted, there are some areas that need more work but overall I think this is looking excellent. Let's merge?
Looking on webpagetest (and ignoring the First Byte Time), it seems like this includes 15Kb less for Document Complete, and 1Kb extra for Fully Loaded.
🎉 Unexpected good news?! |
Can't wait to see this merged! |
# Conflicts: # www/src/components/prev-and-next.js # www/src/utils/typography.js
🚨Almost mandatory YT link: https://www.youtube.com/watch?v=tm6x0q2INSs |
Haaaaaacktooooobeeeer!
🍂⚗️📐🔦🧰🧹🔨🙃
This PR
(draft)putswww
ongatsby-plugin-theme-ui
🔌, adding a "dark mode" 🌙 along the way. It'sfairlyfunctionalalready(and builds ;-)), but not without a few rough edges—both visible, andbelow the surface.Basic questions (IMO ;-)) …
theme-ui
? 😛The current state of the dark theme is usable, but MVP.
… and a few 🙄 notes on where this is at:
gatsby-plugin-theme-ui
using thesx
prop along the custom pragma commentutils/presets
in favor ofsrc/gatsby-plugin-theme-ui
, which now is our single (and currently pretty ugly) shadowed source of truthwrap-root-element
anymore inwww/gatsby-ssr.js
—src/gatsby-plugin-theme-ui/components
insteadsx
, so most token imports (from the removedutils/presets
) are gonesrc/gatsby-plugin-theme-ui
—(mostly)mediaQueries
theme-ui
responsive styles array for now; not against it, just a bit scared ;-)utils/typography
toutils/styles/global
and break those into chunks (Prism tokens, code block styles and language badges)—I'm not attached to the new location though; both things simply helped refactoringhomepage-logo-banner
logo colors/features
.
find out why usingedit: updatingtheme-ui
'suseCustomProperties
errorstheme-ui
helped/guidelines/*.*
pagesutils/guidelines/theme
utils/guidelines/theme-inverted
(used in/guidelines/typography
)—one dark mode is enough ;-)emotion-theming
gatsby-design-tokens
tocolors
required bytheme-ui
:gatsby-design-tokens
'colors.text
objectcolors.ui
colors.ui.border.subtle
->colors.ui.border
clip: rect(0, 0, 0, 0)
) inutils/styles
— rule of three easy ;-)avatar
component, use it intemplate-contributor-page
WebkitFontSmoothing: antialiased
—we switched to using it onhtml
some time agoNow and / or later…
gatsby-design-tokens
, and give the new tokens (and their names) a good second look, consolidateRelated Issues
#8789 — Documentation Dark Theme