CSS Formatter/Minifier
Format or minify CSS stylesheets
1. What is CSS?
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of HTML documents. It controls layout, colors, fonts, and overall visual appearance of web pages.
2. How does it work?
Formatting parses CSS rules and adds consistent indentation, line breaks after braces and semicolons, and spacing around selectors. Minifying does the opposite: removing comments, collapsing whitespace, and eliminating unnecessary characters to create the smallest possible file size while maintaining functionality.
Format vs Minify
Formatting makes CSS more readable by adding proper indentation and line breaks. Minifying removes all unnecessary whitespace and comments to reduce file size for production.
3. Examples
Simple CSS rule
body { margin: 0; padding: 0; font-family: Arial; }Multiple selectors
.container { width: 100%; max-width: 1200px; } .header { background: blue; }With comments
/* Main styles */ body { color: #333; } /* Footer */ .footer { margin-top: 20px; }