Category: <span>Tips and Tricks</span>
Musings on web, technology, worklife and more.
-
Mocking @wordpress/api-fetch in Gutenberg unit tests
Learn how to easily mock out and control `@wordpress/api-fetch` in your unit tests,
-
Mocking WP_Http in WordPress PHP Unit tests
If you write automated tests for your PHP code (and you should try!) you’ll often find yourself needing to mock/stub calls to pieces of code that are not under test. With WordPress, our unit tests tend to be more akin to integration/functional tests where we’re testing that several pieces of interrelated code work well when … Continued
-
Deploying WordPress sites to Pressable via the command line
Pressable is a reliable and powerful WordPress hosting solution, but it doesn’t provide SSH access. So how can we achieve robust and automated deployments that can be run from the command line?
-
Animating CSS text alignment
This week, a colleague of mine asked whether it was possible to animate the CSS text-align property using CSS transitions. My immediate response was of course “no!”, but despite having said that I had a nagging suspicion it was in fact achievable in some (as yet unknown) way. Given that the animation was fairly critical to … Continued
-
SVG Transitions not working in IE11
I’ve recently been working a lot with animating SVG graphics. In order to do this I’ve been using CSS3 Animations. By inlining SVGs directly in my HTML document, I simply use CSS to target SVG nodes and apply @keyframe animations as required. This technique has worked well across all my target platforms with one exception – Internet Explorer 11. … Continued