Humorous 5-star rating component using poop emojis, styled with CSS filters for inactive states and reverse flex-direction for hover logic.

Emoji Poop Rating Component

A humorous take on the classic 5-star rating component, replacing stars with poop emojis. The layout utilizes flex-direction: row-reverse combined with the CSS general sibling combinator (~) to highlight all preceding emojis on hover or selection without JavaScript. Inactive emojis are styled using filter: contrast(0) brightness(2) to appear as blank outlines.

Technologies:
HTML CSS/SCSS JavaScript
Difficulty:Beginner
Browser Support (as of Jun 2026):
Chrome Chrome 53+ Edge Edge 79+ Firefox Firefox 35+ Safari Safari 9.1+
Features:
Emoji RatingCSS FiltersReverse Flex Layout
Code by: creme creme
License: MIT

See the Pen Emoji Poop Rating Component.

E-commerce product page showing a modern chair with color swatch options that dynamically change the product image and background gradient

E-Commerce Product Viewer

This is a CSS-Only E-Commerce Product Viewer. It implements a fully functional product configurator — including color variant swapping, synchronized background theme changes, and an interactive details accordion — without a single line of JavaScript. Its function is to demonstrate complex UI state management and immediate visual feedback using native CSS capabilities.

Technologies:
HTML CSS
Difficulty:Intermediate
Browser Support (as of May 2026):
Chrome Chrome 43+ Edge Edge 12+ Firefox Firefox 16+ Safari Safari 9+
Features:
CSS Checkbox HackDynamic ThemingAccordion AnimationImage Swap
Code by: Ivan Grozdic Ivan Grozdic
License: MIT

See the Pen E-Commerce Product Viewer.

A minimalist dimmer slider that cycles through brightness levels with each click.

Smart Home Lighting Multi-State Switch

A minimalist dimmer slider that increases brightness (white bar width) with each click and resets to off after reaching the maximum level.

A sci-fi character selection screen using radio buttons to highlight the chosen character.

Radio Button Selector

A sci-fi character selector utilizing the CSS ‘Radio Button Hack’ for state management. While Vue.js handles data binding, the visual logic relies entirely on sibling combinators and :checked to toggle visibility and opacity, creating a seamless grid-based UI.

See the Pen Radio Button Selector.

Frequently Asked Questions

What is the architectural advantage of the radio hack over JavaScript state management?

The radio hack uses the :checked pseudo-class with sibling combinators to manage mutually exclusive states entirely through CSS. Each radio input represents one state option, and CSS handles visibility, position, and styling changes without event listeners, state variables, or DOM manipulation.

How do I ensure radio-hack components are accessible to screen readers?

Use <fieldset> with <legend> for grouped radio inputs and <label> elements wrapping each radio. The hidden radio inputs remain focusable via Tab and arrow keys, and role="tablist" can be added to the container for tab-like interfaces.

Which CSS properties create radio-hack transitions without triggering reflows?

Use opacity and transform: translateX() or translateY() for panel transitions — all compositor-only properties. Content panels should be positioned with position: absolute so they stack without affecting document flow.

How should radio-hack layouts adapt responsively without breaking the state logic?

Use Container Queries to adjust panel layout at different container widths — the radio input state remains unaffected by layout changes. Use grid-template-areas with media queries to rearrange tab labels while maintaining the radio-based state selection.