Serg Hospodarets Blog

Serg Hospodarets blog

Front-End frontiers
Serg Hospodarets
JavaScript Fetch API in action
In short, Fetch API- it's a new Promise- based standard for doing AJAX requests.

Syntax for XHR was provided more then 10 years ago (XMLHttpRequest2 - about 4 years ago).
Many things changed, we got HTML5, CSS3, also close to start using EcmaScript 6.
From jQuery Deferred, $q and Native JavaScript Promises people became familiar and like promises in JS.
It’s time for new laconic API to do AJAX-requests and interact with them.
And time is come!

...
Read full post  >
Finding unused SCSS variables

When you have big project with many files and dependencies, usually you should care about good code base and periodic cleaning / refactoring. The same situation I had when decided to refactor SCSS files- structure, naming and variables…

I was surprised when figured out- there aren’t good instruments to find unused SCSS variables.

The ways they appear is usual:

  • somebody removed use of variable but forgot to delete declaration
  • it was used for declaration of another variable or inside some expression
  • someone added it "for future" or decided to use variable later
  • etc.
...
Read full post  >
CSS filters in action

About CSS filters

The CSS filter property provides the way to modify rendering for elements in the browser. You can use it to apply visual effects like blur or shifting colors. There are many ways to use it- from providing Instagram/PhotoShop- like filters to the site themes.

Demo

...
Read full post  >