Do you use ":has()" already?

february 14, 2024 - Css

The :has() CSS pseudo-class represents an element if any of its descendants satisfy the specified selector. It's part of the CSS Selectors Level 4 specification and allows you to style elements based on the existence or characteristics of their descendants.

The "checkbox hack"

february 10, 2024 - css

The "checkbox hack" in CSS refers to a technique where we leverage the adjacent sibling selector (+) to apply styles to elements that come immediately after a checkbox input element when it is checked.

Typically, the adjacent sibling selector is used to select and style elements that come right after another element.

continue reading >>
image domain

CSS :before and :after

january 12, 2024 - css

The :before and :after pseudo-elements in CSS are used to insert content before and after the actual content of an element, respectively. They are often used to add decorative elements or generate additional content without modifying the HTML structure.

The :before and :after pseudo-elements in CSS provide several advantages, primarily related to their ability to insert additional content into the DOM without modifying the HTML structure. Here are some advantages:

continue reading >>
image domain

Animations: css first!

february 7, 2024 - css

When you think of CSS animations, you probably think of animation sequences and not direct of animations.

In general, if you can achieve your desired animation effect using CSS animations without much complexity, it is recommended to use CSS animations. CSS animations are simple to implement and have better performance compared to JavaScript animations.

continue reading >>
image code

CSS animations

january 12, 2024 - Css

CSS animations allow you to animate elements on a web page without using JavaScript. You can animate properties such as opacity, transform, color, and more.

Animations are created by defining keyframes and applying them to elements using the animation property. CSS animations provide a smooth and visually appealing way to enhance user experience on websites.

continue reading >>
image domain