Node.js debugging with Chrome DevTools (in parallel with browser JavaScript)

Recently Paul Irish described how you can debug Node.js applications with Chrome DevTools.

Since that time Chrome DevTools have evolved and the step, where you had to open the separate page with a specific URL to debug the Node.js code, was removed.

It means, today you can debug your browser JavaScript files and Node.js ones in the same DevTools window in parallel, which makes the perfect sense.

Let’s take a look how it works.

...

Progressive Web Apps: How to migrate to HTTPS

This is the first of articles where I want to describe how to migrate/extend your web app to being a Progressive Web App

Main points of a Progressive Web App are:

  • it’s secure (uses HTTPS)
  • app install banners give users an easy way to add the app to their home screen/launchpad
  • service worker makes the app load nearly instantly and work offline
  • application is responsive (phones, tablets and laptops)
  • ability to send users web push notifications
  • smooth and great user experience

Let’s start from the first item and add security (HTTPS).

...

CSS @apply rule (native CSS mixins)

In my previous article CSS custom properties (variables) In-Depth I described CSS custom properties (variables) and variations of their usages.

If you started thinking to move from CSS preprocessors to plain CSS after that- next your question might be: “what about mixins”?

And voilà- there is not only an editor’s draft- https://tabatkins.github.io/specs/css-apply-rule/

but even working implementation in Chrome- https://www.chromestatus.com/feature/5753701012602880

Before continuing reading, make sure you understand the terms of CSS custom properties and CSS mixins.

...

CSS custom properties (native variables) In-Depth

I thought to start from explaining the purpose of having variables in CSS but actually popularity of CSS pre/postprocessors already did that.

Couple examples:

  • color variables for branding
  • consistent components properties (layout, positioning etc.)
  • avoid code duplications

Yes, of course, you still can search and find/replace all you need manually in your codebase but it’s like not having variables in JS- pain. Having dynamic and scoped CSS variables provides even more abilities for your experiments and applications- you can read, set and update them on the fly! Also you can prevent code duplications around your codebase as recently Webkit guys did in their Web Inspector.

And finally you have an interface to easily pass data from CSS to JS (for example media breakpoint values).

Here is the short-list of features CSS properties have:

  • they are dynamic and can be changed at runtime
  • they are easily to read/write from JS
  • they inherit, cascade and have scopes

So let’s dive deeper what CSS properties are and how to use them.

...