Posts relating to
Dev Tricks

Cross-browser support for hiding scrollbars, including FireFox

Cross-browser support for scrollbar styling and visibility is a challenge. It’s as simple as that. This article provides a solution that addresses the issue of hiding the scrollbars, using scrollbar-width, ::-webkit-scrollbar and -ms-overflow-style. What are Scrollbars? Scrollbars are bars that appear down the right-hand side and across the bottom of the browser (or an element […]

Compress directories from the command line, excluding node_modules and development files

This simple article provides a CLI command to compress a directory whilst excluding specific sub-directories and files. We do a lot of custom development using modern development tools. From time-to-time we need to compress certain directories for deployment to production. In such cases, it is very common that some files and sub-directories need to be […]

How to fix the issue with IntelliJ and PHPStorm not resolving SASS and JS Imports

This article describes how to resolve the issue with IntelliJ not providing autocomplete for imported SASS and JS resources. The same fix can be applied to PHPStorm. IntelliJ is an awesome IDE, but recently it stopped recognising imported SASS and JS resources. This didn’t stop them from compiling, but was very annoying, as it flagged […]

Remove menu link types from the WordPress menu options screen

On a client site, we wanted to restrict menu items to Custom Links, only. Thus remove all other menu types. The main drive behind this was to improve the user experience and reduce confusion, as the menu is only for Social Links. With a brief search yielding very little I set about coding a solution, […]

How to break long words using CSS @supports

Recently, I had an odd scenario where wrapping long text needed either word-wrap, overflow-wrap or word-break to achieve the same overflow pattern across different browsers. To arrive at a suitable solution I opted to use @supports to maintain control of the declarations. What is @supports? @supports is a feature query, whose associated block of statments […]

Conditionally enqueue scripts and stylesheets on specific pages

There are many use-cases where scripts and stylesheets only need to be loaded on certain pages. One such example would be to only load the JavaScript and CSS stylesheets for Contact Form 7 (a lightweight contact form plugin) on the contact page. This article will demonstrate how to conditionally load the JS and CSS for […]