November 2021

Writing conditionals in CSS: when/else

Writing conditionals in CSS: when/else

  • November 24, 2021

CSS already has had conditionals in the form of @media queries or @support queries to selectively apply styling to the document. But there is a new proposal called when/else which takes it to a different level. At the time of writing this post, the when proposal for when has been...

Retrieving content value of ::after or ::before in JavaScript

Retrieving content value of ::after or ::before in JavaScript

  • November 21, 2021

Let us suppose we had an HTML element which had an ::after property assigned to it. We are going to be retrieving the content value of ::after or ::before of this element using JavaScript. For the following element: If we needed a way of retrieving content value of ::after in...

How to permanently remove a file from Git history

How to permanently remove a file from Git history

  • November 12, 2021

We all make mistakes sometimes. Pushing files that contain some secrets or sensitive information to a Git repository is fairly common. And even if we revert the commit, it would still be present in the Git history of the project. In such cases, where we want to permanently remove a...