Web Development
JavaScript
JSON Modules in JavaScript
ES Modules were introduced in ES2015. The import and export keywords by default are only applicable to JavaScript code. But there is...
JavaScript
How to check if a string contains emojis in JavaScript?
If you have user-generated content in your web application, chances are you have to deal with strings containing emojis. Since emojis are...
Web Development
Writing conditionals in CSS: when/else
CSS already has had conditionals in the form of @media queries or @support queries to selectively apply styling to the document. But...
JavaScript
Retrieving content value of ::after or ::before in JavaScript
For the following element:#element::after {
content: 'Custom value'
}If we needed a way of...
Web Development
Select all text on click using CSS
When a user has to select some text on a website, they have to drag and hold their mouse, or use double-click...
Web Development
Detecting element causing CSS overflow
CSS overflows are an annoyance that keep showing up once in a while and are really hard to debug. Unwanted and unexpected...
Recent Articles
How to sort a Set in JavaScript
ES6 introduced the set data structure in JavaScript. But sets are not ordered abstract data structures. So there is no .sort() property...
Debugging CSS scroll using one simple style
I have been doing a lot of complicated front-end work off lately and that always brings me back to the class conundrum...
CSS :has a parent selector now
CSS now includes a :has selector that allows us to apply styles on the basis of what is happening inside an element....
How to fix “invalid active developer path” after MacOS update
If you are here, then you are getting an "invalid active developer path" error on running commands in the terminal after a...
Getting the value of an input element as a number without parseInt
Every once in a while, you come across something and you think, how did I not know this earlier? valueAsNumber is that thing...

Hi there! Want some more knowledge?
Think that the knowledge shared is helpful? You might want to give our mailing list a try. We'll send you 2-4 emails a month, right when new posts come out.