CSS

Debugging CSS scroll using one simple style

Debugging CSS scroll using one simple style

  • November 18, 2022

I have been doing a lot of complicated front-end work off lately and that always brings me back to the class conundrum of which element was adding a horizontal/vertical scroll to my page/elements. Debugging CSS scroll is a pain that I have felt too many times now and I always...

CSS :has a parent selector now

CSS :has a parent selector now

  • November 12, 2022

CSS now includes a :has selector that allows us to apply styles on the basis of what is happening inside an element. Often referred to as a parent seletor, the :has() function allows us to achieve this and more. Let us take a look at this relative selector. It only...

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...

Select all text on click using CSS

Select all text on click using CSS

  • October 22, 2021

When a user has to select some text on a website, they have to drag and hold their mouse, or use double-click it. Sometimes, there are some samples that we know that the user is going to copy for sure. A use case for this can be code samples. The...

Detecting element causing CSS overflow

Detecting element causing CSS overflow

  • October 13, 2021

CSS overflows are an annoyance that keep showing up once in a while and are really hard to debug. Unwanted and unexpected scrollbars can lead to hours of inspecting the DOM to figure out what element is causing the issue and clicking random elements in the Chrome dev tools until...

What is SASS and why you should use it

What is SASS and why you should use it

  • September 2, 2015

I have been playing a lot with CSS these days, and then I came across the concepts of using variables inside it. I came to know of two ways to do so, SASS and LESS. I was eager to try both out but it was only possible one at a...