Make it easier to edit custom blocks CSS #150
Merged
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.
We like to create custom blocks with Genesis. However when we edit the blocks/blocks.css file in the theme folder we have to clear the browser cache each time and tell that to our clients.
We would much prefer is that file would be always loaded fresh from the server - at least if there was a change in the content.
That's why we did a miniature change which puts the file modification timestamp into that stylesheet URL.
This way a browser is forced to load the new file if you make modifications to your custom blocks CSS file.
Very important specially if you use a CDN.
Changes
Testing instructions
wp-content/themes/monochrome-pro/blocks/blocks.css
loads with a timestamp in URL query, likehttps://example.com/wp-content/themes/monochrome-pro/blocks/blocks.css?ver=1690892560