-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add breakpoints mixin and usage example. #36
feat: add breakpoints mixin and usage example. #36
Conversation
@chrisbellboy We've approved #34 and will be merging (thanks for that!) and we're most of the way there to approving this one also. Though looking for some feedback if you would?
|
@tommusrhodus No worries and thanks for the feedback 👍
|
I was actually wondering if those breakpoints can be overwritten in a |
I'm back 🤓 and pushed a few more commits:
To make them sync up with the
But then learnt that unfortunately CSS vars can't be used in media queries 🙈 The only other idea I could think of was to import the theme.json values into SASS. This seems possible but might over-complicate the overall setup a bit. We'd need to use something like this package and then extend the webpack.config.js to use the importer. What do you guys reckon? 🤔 If you have any other ideas, happy to give them a go too. |
It looks like overriding the media queries or making them dynamic is not yet supported by Gutenberg, but it is something that is being discussed. Similarly, there is a W3C proposal which, among other things, will remove the limitation of There is also an interesting discussion about using Anyway, we'll likely have to revisit this issue once those issues/PRs are settled, but for the time being, I think hard-coding the breakpoints and keeping them in sync with the Gutenberg core is the way to go. I like the changes to the breakpoint mixins. I liked Bootstrap's If anything, I'd just remove the comment like Also, if we want to encourage more modularity, we could create an |
Hey @ahegyes That all sounds good to me 👌 I've removed the comments now and feel free to let me know if you think there should be any more tweaks. |
Approved on March 8th meeting. |
Changes proposed in this Pull Request
This is built on top of #34 (so please check that one out first).
Changes summary
abstracts
folder.abstracts\_variables.scss
.abstracts\_mixins.scss
..wp-theme-style
inlayouts\_pages.scss
tweaked to show usage examples of the mixins.