This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This lets us use the functionality of
register_block_type
to automatically enqueue the scripts and styles used by blocks in the editor, and eventually, styles on the frontend as well. Also adds cssnano to minify our CSS.Why go back to separate files after combining them in #220 ? By having each block as its own file, we can take advantage of the
register_block_type
php function to automatically enqueue our CSS on the frontend, which will be useful for the Featured Product block, and also when we move to the custom grid display.There should be no functionality changes.
How to test the changes in this Pull Request:
Note: I need to figure out a solution for separating out editor & front end styles via webpack, but this is eluding me at the moment. This will work for now, so I'm switching to "needs review".