Toolkit
Hire me
CSS

CSS Cheatsheet

CSS Cheatsheet in Jwala Baheliya's frontend toolkit. A live css utility with copy-ready output and in-browser previews.

Visual Guide
A cleaner, more guided way to use CSS Cheatsheet.

The left rail keeps navigation nearby, the right rail keeps your reading position visible, and the live tool stays front and center once you are ready to use it.

Category
CSS
Mode
Interactive docs
Route
/cheat
What It Does
CSS Cheatsheet helps you generate, test, and copy CSS faster without manually tweaking values in the browser over and over.
How To Use
Add your input, upload a file, or pick the values you want to work with. Then adjust the controls until the live preview matches what you need.
What You Get
Live preview plus output you can copy, reuse, or export immediately.

What This Tool Does

CSS Cheatsheet helps you generate, test, and copy CSS faster without manually tweaking values in the browser over and over.

If you are not sure where to start, use the live controls below, watch the preview change, and copy the result only when it matches what you want in your project.

Live Tool

Interactive, client-side, and still running directly inside this docs page.

All tools
CSS Cheatsheet

A broader quick-reference pack for layout, typography, effects, responsive patterns, forms, and modern CSS features.

Sections: 12
Snippets: 53
Showing: 53
Layout
6 snippets
Center everything
css
display: flex;
align-items: center;
justify-content: center;
Space between row
css
display: flex;
justify-content: space-between;
align-items: center;
Wrap children
css
display: flex;
flex-wrap: wrap;
gap: 1rem;
Responsive auto grid
css
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1rem;
Equal-height cards
css
display: grid;
grid-auto-rows: 1fr;
Sidebar + content
css
display: grid;
grid-template-columns: 280px minmax(0, 1fr);
gap: 1.5rem;
Spacing
4 snippets
Page container
css
width: min(100% - 2rem, 72rem);
margin-inline: auto;
Section spacing
css
padding-block: clamp(3rem, 6vw, 6rem);
Fluid card padding
css
padding: clamp(1rem, 2vw, 1.5rem);
Safe viewport height
css
min-height: 100svh;
Position
4 snippets
Sticky header
css
position: sticky;
top: 0;
z-index: 50;
Absolute overlay
css
position: absolute;
inset: 0;
Absolute center
css
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
Floating action button
css
position: fixed;
right: 1rem;
bottom: 1rem;
Typography
5 snippets
Fluid heading
css
font-size: clamp(2rem, 5vw, 4.5rem);
line-height: 0.95;
Readable paragraph
css
max-width: 65ch;
line-height: 1.7;
Balance headline
css
text-wrap: balance;
Pretty body text
css
text-wrap: pretty;
Two-line clamp
css
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
Backgrounds
4 snippets
Linear gradient
css
background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 50%, #38bdf8 100%);
Radial glow
css
background: radial-gradient(circle at top, rgba(56, 189, 248, 0.25), transparent 45%);
Mesh background
css
background:
  radial-gradient(circle at 20% 20%, rgba(244, 114, 182, 0.25), transparent 30%),
  radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.2), transparent 28%),
  #020617;
Image cover
css
background: url('/image.jpg') center / cover no-repeat;
Borders & Radius
4 snippets
Rounded card
css
border: 1px solid var(--border);
border-radius: 1.5rem;
Pill shape
css
border-radius: 999px;
Gradient border
css
border: 1px solid transparent;
background:
  linear-gradient(#0f172a, #0f172a) padding-box,
  linear-gradient(135deg, #38bdf8, #f472b6) border-box;
Dashed drop zone
css
border: 2px dashed color-mix(in srgb, currentColor 35%, transparent);
Effects
5 snippets
Soft shadow
css
box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
Layered shadow
css
box-shadow:
  0 1px 2px rgba(15, 23, 42, 0.08),
  0 12px 24px rgba(15, 23, 42, 0.12);
Glassmorphism
css
background: rgba(255, 255, 255, 0.08);
backdrop-filter: blur(18px) saturate(160%);
Image polish
css
filter: saturate(1.1) contrast(1.05);
Text glow
css
text-shadow: 0 2px 18px rgba(14, 165, 233, 0.35);
Interactions
4 snippets
Smooth transition
css
transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
Lift on hover
css
transition: transform 180ms ease;

:hover {
  transform: translateY(-4px);
}
Keyboard focus ring
css
:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.45);
  outline-offset: 3px;
}
Disable pointer hits
css
pointer-events: none;
Animation
4 snippets
Fade up
css
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

element {
  animation: fade-up 500ms ease both;
}
Float loop
css
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

element {
  animation: float 3s ease-in-out infinite;
}
Stagger by variable
css
animation-delay: calc(var(--index) * 80ms);
Reduced motion safe
css
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
Responsive
4 snippets
Tablet breakpoint
css
@media (min-width: 768px) {
  .layout { grid-template-columns: 1fr 1fr; }
}
Desktop breakpoint
css
@media (min-width: 1024px) {
  .layout { grid-template-columns: 280px 1fr; }
}
Clamp width
css
width: clamp(16rem, 40vw, 28rem);
Container query
css
@container (min-width: 42rem) {
  .card { grid-template-columns: 1fr 1fr; }
}
Forms
4 snippets
Input reset
css
appearance: none;
background: transparent;
border: 0;
font: inherit;
Custom placeholder
css
::placeholder {
  color: color-mix(in srgb, currentColor 45%, transparent);
}
Accent color
css
accent-color: #0ea5e9;
Invalid state
css
:invalid {
  border-color: #ef4444;
}
Modern CSS
5 snippets
Cascade layers
css
@layer reset, base, components, utilities;
CSS nesting
css
.card {
  & img {
    border-radius: inherit;
  }

  &:hover {
    transform: translateY(-2px);
  }
}
Color mix
css
background: color-mix(in srgb, var(--accent) 18%, transparent);
Aspect ratio
css
aspect-ratio: 16 / 9;
Subgrid
css
grid-template-columns: subgrid;

How To Use It

  1. 1Add your input, upload a file, or pick the values you want to work with.
  2. 2Adjust the controls until the live preview matches what you need.
  3. 3Copy or download the final output and use it in your project.

Related Tools

More tools from the same category, so you can keep moving without going back to the full index.

Browse all
Quick nav
CSS Cheatsheet
CSS