makandra dev

The need for clearfix hacks has been greatly reduced since we could layout with Flexbox or CSS Grid.

You can scale background images in CSS to the container size using background-size (Demo). Commonly, we use contain or...

When using custom properties in your stylesheets, you may want to set a specific property value to an existing variable...

After switching a project from Sprockets to Webpack, I started observing a bug that was hard to debug: Our...

The Node Version Manager allows installing multiple NodeJS versions and switching between them. By default, it does not automatically switch...

When testing JavaScript functionality in Selenium (E2E), you may need to access a class or function inside of a evaluate...

markodenic.com

Table of content for the linked article: 1. The `loading=lazy` attribute 2. Email, call, and SMS links

jetbrains.com

In RubyMine folders can be excluded from search, navigation etc. by marking it as excluded. You might sometimes wish to...

If your Webpack build is slow, you can use the Speed Measure Plugin for Webpack to figure out where time...

Sometimes you want to load code on demand. For instance, when a a large library is only used on a...

makandra dev

Webpack builds can take a long time, so we only want to compile when needed. This card shows what will...

makandra dev
web.archive.org

The attached article examines what the percent unit (%) is relative to in CSS The article does a great job of...

I use the TypeScript compiler for this, since its output is more minimal than Babel's. The following will transpile...

When you have a hex color code, you can easily convert it into its RGB values using plain Ruby.

When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...

Browsers blocks abusable JavaScript API calls until the user has interacted with the document. Examples would be opening new tab...

By default parallel_tests will spawn as many test processes as you have CPUs. If you have issues with flaky...

Insomnia is a GUI tool to help you communicating with an API. There are also other tools to do this...

getbootstrap.com

Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...

makandra dev

Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...

makandra dev

There are several tools for DNS debugging which offer you more or less information. Most of the time the more...

Rails supports alert and notice as default flash types. This allows you to use these keys as options in e.g...

makandra dev

I just finished migrating a project from the Asset Pipeline to Webpacker, this is what my diff to master looks...

makandra dev

Feature Queries (Edge 12+): Similar to @media queries, @supports blocks can be scoped to browsers that support a given declaration...