This repository was archived by the owner on Feb 27, 2024. It is now read-only.
Integrate Original WP Block Library CSS #697
Unanswered
ThatGuySam
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for this project! I tried doing Block Editor myself with Gatsby and very much appreciate all the pre-done work.
On my Gatsby site, I didn't want to write a bunch of custom CSS and Tailwind adapters for the Block Editor elements so I just used the public CSS that the WordPress team deploys online.
https://github.com/WordPress/gutenberg/blob/f3d18c84eabe213d406b1507e4596111a7dda1ec/packages/block-library/README.md
And then I would import the library into PostCSS like this:
@import '~@wordpress/block-library/build-style/style.css';
I imagine you could also import it via the normal Webpack loader way.
import '@wordpress/block-library/build-style/style.css'
From there you might need to import a version that matches up with the Editor version on the source WordPress site to keep the styling consistent.
Perhaps this has already been discussed somewhere but I figured I would provide a request to see if this can help.
Beta Was this translation helpful? Give feedback.
All reactions