Perspectiv | LAB

Perspectiv | LAB

Home
Notes
Digests
Archive
About
Using :has() pseudo-class to style elements based on their children
Most developers are familiar with CSS selectors that target elements based on their attributes, classes, or IDs.
Jul 29, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Using :has() pseudo-class to style elements based on their children
Using `useCallback` with Dependencies
Many React developers are familiar with the useCallback hook, but few know how to fully use it.
Jul 28, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Using `useCallback` with Dependencies
Using the void Operator to Avoid undefined in Arrow Functions
Many developers are familiar with the arrow function syntax in JavaScript, but few know about the void operator trick to avoid undefined values.
Jul 26, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Using the void Operator to Avoid undefined in Arrow Functions
Using the @apply directive to create custom classes that inherit styles from other classes
In this example, we're creating a custom class called .custom-button that inherits the styles from .bg-orange-500 and .hover:bg-orange-700. This allows…
Jul 25, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Using the @apply directive to create custom classes that inherit styles from other classes
Using :empty pseudo-class with :not pseudo-class
Most of the developers don’t know about this CSS trick is using the :empty pseudo-class in combination with the :not pseudo-class.
Jul 24, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Using :empty pseudo-class with :not pseudo-class
Using triple equals (===) for comparison is a best practice
Double Equals (==)
Jul 24, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Using triple equals (===) for comparison is a best practice
Context API and State Management Libraries
Context API
Jul 23, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Context API and State Management Libraries
Using grid-template-areas to create complex grid layouts
Using grid-template-areas is a powerful way to create complex grid layouts.
Jul 23, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Using grid-template-areas to create complex grid layouts
Using calc() to create responsive typography
The calc() function in CSS allows you to perform mathematical calculations to determine the value of a property.
Jul 22, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Using calc() to create responsive typography
Using :has() pseudo-class to style parent elements
The :has() pseudo-class is a relatively new addition to CSS, and it allows you to style an element based on the presence of a specific child element.
Jul 21, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Using :has() pseudo-class to style parent elements
Scrollbar with a bit of CSS easily
Let me explain what each part of the code does:
Jul 20, 2024 • 
Perspectiv

Share this post

Perspectiv | LAB
Perspectiv | LAB
Scrollbar with a bit of CSS easily
© 2025 Perspectiv
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share