Category Archives: Original Content
Three important things you should know about CSS :is()
Continue reading “Three important things you should know about CSS :is()“
The Future of CSS: Scroll-Linked Animations with @scroll-timeline (Part 2)
Control the behavior of JavaScript imports with Import Maps
Shipping in Chrome 89 are Import Maps, which allows control over what URLs get fetched when importing modules. Let’s take a look at this very welcome addition. When importing ES Modules (on the web), you need to refer to them using their full filenames or URLs: import moment from “/js/moment/moment.js”; import { partition } from …
Continue reading “Control the behavior of JavaScript imports with Import Maps”
The Future of CSS: Scroll-Linked Animations with @scroll-timeline (Part 1)
Style Spelling and Grammar Errors with the ::spelling-error and ::grammar-error pseudo-elements
Part of the CSS Pseudo-Elements Level 4 Specification are ways to style spelling and grammar errors. By default spelling errors — words you have mistyped — get a red dotted underline, thanks to the ::spelling-error pseudo-class selector you can tweak that. Grammar errors — such as a missing capital letter at the beginning of a …
Style the target text from text-fragment links using the ::target-text pseudo-element
One of my favorite features that shipped with Chrome 80 — apart from Optional Chaining — is the ability to link to text-fragments. By default Chrome will highlight those in yellow: 💡 To easily create text-fragment links there’s this Chromium Plugin you can use. ~ As tweeted before, coming to Chromium 89 is the ability …
Apache .htaccess disable access to site during Maintenance Mode / Deployment
Because I have to look this up from time to time, a note to myself: Add the contents below to your .htaccess to have Apache respond with a “Temporarily Unavailable” message in case a .maintenance file exists. — Handy during deploys RewriteEngine On # Show “Temporarily Unavailable” page if there’s a .maintenance file present RewriteCond …
Continue reading “Apache .htaccess disable access to site during Maintenance Mode / Deployment”
Apache .htaccess trim www. prefix from domain name
Because I have to look this up from time to time, a note to myself: Add the contents below to your .htaccess to have Apache trim the www. prefix from URLs while preserving the rest of the URL (domain name, querystring, etc). RewriteEngine On # Trim www prefix RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} …
Continue reading “Apache .htaccess trim www. prefix from domain name”
Apache .htaccess enforce HTTPS
Because I have to look this up from time to time, a note to myself: Add the contents below to your .htaccess to have Apache enforce HTTPS while preserving the rest of the URL (domain name, querystring, etc). RewriteEngine On # Enforce HTTPS (everywhere) RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] ~