Despite doing this front-end thing for over a decade, I still encounter new problems thanks to the ever-evolving web specifications. One of the newer specifications is Web Components.
Now, my situation was I wanted to see Bootstrap 5 Javascript components. Because of the closed-wall nature of Shadow DOM means, the global approach Bootstrap takes by default will not work for components.
Fortunately, it is possible to use Bootstrap components with Shadow DOM, albeit programmatically.
After being deplatformed a little while ago, Donald Trump created his Twitter clone, Truth Social. As you can imagine, Truth Social launched to about as much fanfare as a fart in an elevator. Still, my curiosity got the better of me.
For whatever reason, the site is currently restricted to Canada and the United States. And, it is worth pointing out that this restriction is Truth Social themselves restricting which countries can access the site. I am not sure what the reason is for restricting access. Seems ironic given it’s meant to be a Twitter-esque site for free speech.
WordPress is incredibly powerful, and every so often, a new feature gets added that goes under the radar that can dramatically change how you build sites. In WordPress 5.1, an addition of a new WP_Site_Query class was created. It allows you to query your network of sites but goes beyond just getting IDs and making you loop over them to use with switch_to_blog($id)
Here is another super-specific use case I had with WordPress Multisite recently.
If you have used Flexbox before in CSS, you might have used the shorthand property flex: 1. And if you’re like me, you might have been using it but forgotten or not even known what this is shorthand for.
I know to use this shorthand when I have Flexbox items that I want to take up the rest of the space. It’s perfect for situations where you have an image on the left and a box of text on the right (product image and product name + price).
In WordPress, creating new sites from the admin interface can be tedious, especially if you want to add custom metadata to sites/ACF option fields.
I had a scenario where I needed to create 1800 sites from a spreadsheet. Doing it one-by-one was not going to cut it, so I needed a code solution where I could loop through these sites and create them without needing the UI.
Like almost everything in WordPress, there is a function you can call. It’s called wpmu_create_blog — I have a Multisite subdomain install, so this code won’t work for directory-based multisites (it’s not hard to change, though). And I found the documentation to be quite poor. But, here is what I ended up doing.
After an outage seven days ago, unpkgd.com, a widely used CDN for NPM packages, is again down.
This time, the outage is more severe. At the time of writing, unpkgd.com has been down for hours. Even the official status page is down.
With two outages in such a short period, I am starting to doubt whether I will continue to use unpkgd in the long term. It’s a free service, so I can’t complain really. But, it does highlight the fragility of relying on free services.
If I had a dollar for every time my wife and I discovered a great show on Netflix only to discover it was cancelled after one or two seasons, we would be stupidly rich.
Netflix recently revealed they’re losing subscribers. You probably already knew this because you’ve either cancelled your Netflix account, considered cancelling it or seen the numerous news stories about their untimely demise.
What some people don’t realise is Netflix, like other companies, pulled out of the Russian market over its unwarranted invasion of Ukraine and lost 700,000 paid subscribers. Between April and July, Netflix lost one million subscribers.
As much as I love front-end development, the ecosystem can sometimes inflict unnecessary pain. Given the front-end ecosystem relies on very few packages for a lot of modern development, when something changes and packages that rely on those don’t update: it’s a disaster.
One such issue is Autoprefixer.
You most likely arrived here searching Google for the error message: autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
The beauty in WordPress is not only its ecosystem. It’s the ability to customise almost every facet of it using a filter or hook.
I had a scenario recently where I wanted to put a web application theme in a less painful directory to access. I wanted a folder called themes in my root directory.
Instead of wp-content/themes/my-app-theme I wanted themes/my-app-theme instead.
The structure resembles something like this:
themes
my-app-theme
wp-content
wp-includes
index.php
wp-config.php
Say what you will, but since its introduction in 2009, Node.js has been the undisputed king of server-side Javascript. Created by Ryan Dahl, Node.js had virtually no competition for years.
Until recently, the only person to truly challenge Node.js was Ryan Dahl with his runtime Deno that improved upon some of the flaws that Ryan saw in Node.js which that were systematic and difficult to fix.
Well, there is a new competitor NOT written by Ryan this time called Bun. Who said 2022 had no surprises left?