-
Notifications
You must be signed in to change notification settings - Fork 58
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
Styled System exploration for Cross Platform components #1386
Comments
note: |
Let's also try to see if we can make use of styled-system's theme specification to replace Note: The real values for theme attributes reside in gutenberg/bin/packages/post-css-config.js currently. |
Hey @pinarol I did this task here - https://github.com/WordPress/gutenberg/pull/17614/files |
Looking super cool thank you 🎉The only thing left seems like the handling of the z-index, currently I see that they are all kept in one place: gutenberg/assets/stylesheets/_z-index.scss, and the value 20 is actually coming from line: |
Z-index is also supported by theming. In this commit, I use z-index from theme: WordPress/gutenberg@52791f6 |
Super cool thank you! Could you open a PR then? |
Thanks for the PR! 🎉 At this point, I have a question about the Another thing is, I think we need to demonstrate a mobile usage as well, could you be able to replace some |
@pinarol Will create PR for the video block today :) |
I am closing this for now since the prototypes are completed |
Let's explore styled-system to see how it can be useful for designing cross platform primitives.
For this exploration we can use a CSS-in-JS library such as Styled Components. Although it is optional and if there's a better one feel free to use that one.
What should be done?
Box
component to replace div/View.Box
component should be possible via props. We shouldn't pass className to it, instead all the CSS will be hidden insideBox
.div
usages in gutenberg/packages/block-library/src/gallery/gallery-image.js withBox
keeping the same look.Here's a branch with some already done work, let's checkout a new branch from this branch and keep working based on this: WordPress/gutenberg@rnmobile/master...experimental/styled-system-poc the branch still uses old way of getting up the development environment so
npm run dev
will still work for now. If at some point we need to update it from master we should refer to the updated guidelines.The text was updated successfully, but these errors were encountered: