Create authentic Frutiger Aero-style buttons with customizable sizes, colors, and effects using the OKLCH color system.
/* Authentic Frutiger Aero Button CSS */ .frutiger-aero-button { /* OKLCH Color System for accurate colors */ --hue: 140; --sat: 0.2; --glow-intensity: 0.7; /* Color Variables */ --fg: oklch(15% calc(var(--sat) * 0.5) var(--hue)); --bg: oklch(75% var(--sat) var(--hue) / 0.8); --bg-dark: oklch(45% var(--sat) var(--hue) / 0.75); --bottom-glow: radial-gradient( farthest-corner at bottom center, rgba(255, 255, 255, var(--glow-intensity)), transparent ); /* Base Styling */ background-color: var(--bg); background: var(--bottom-glow), linear-gradient(to bottom, var(--bg-dark), var(--bg)); border: 1px solid var(--bg); border-radius: 9999px; /* Shadows and Effects */ box-shadow: 0 4px 4px rgba(0, 0, 0, 0.4); /* Typography */ color: var(--fg); font-family: "Lucida Grande", "Lucida Sans Unicode", "Segoe UI", system-ui, sans-serif; font-weight: 700; text-shadow: 0 2px 0.5em rgba(0, 0, 0, 0.2); /* Layout */ cursor: pointer; position: relative; transition: all 300ms ease; /* Prevent text selection */ user-select: none; -webkit-user-select: none; } /* Top Highlight Effect */ .frutiger-aero-button::after { content: ""; position: absolute; top: 4%; left: 0.75em; width: calc(100% - 1.5em); height: 40%; background: linear-gradient( to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1) ); border-radius: inherit; transition: background 400ms ease; pointer-events: none; } /* Hover State */ .frutiger-aero-button:hover, .frutiger-aero-button:focus { box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4); transform: translateY(-1px); } /* Active State */ .frutiger-aero-button:active { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); transform: translateY(1px); } /* Size Variations */ .frutiger-aero-button.small { padding: 0.5em 1.5em; font-size: 0.875rem; } .frutiger-aero-button.medium { padding: 0.75em 2em; font-size: 1rem; } .frutiger-aero-button.large { padding: 1em 3em; font-size: 1.125rem; }
A fun little project by Visnalize