brokul.dev
  • Blog
  • Archive
  • Feed
  • About

Tag: Front-end

Detecting the default browser font size in JavaScript

From an accessibility point of view, it's worth considering the default font size set in the user's browser. You can easily adjust your design to this value in CSS stylesheets using relative units like rem and em. There might be a situation where you need this value from the JavaScript context. How to get it?

12 February 2022

Extending parent styles in Sass to handle component states

It's a quite frequent case that some components like input fields have many states. It may look different according to some conditions. The classic example is an incorrect value in an input field which results in a red border. How to handle this in Sass?

02 October 2021

Infinite scroll in pure JavaScript for Ghost or WordPress blog

How to create a simple infinite-scroll mechanism? This article describes how infinite scroll is implemented on this blog.

25 March 2021
© brokul.dev 2022