Catalog / CSS Tricks Cheatsheet
CSS Tricks Cheatsheet
A comprehensive cheat sheet covering various CSS tricks, hacks, and optimizations for improved web development. Includes code snippets and examples for easy reference.
General CSS Tricks
Box Sizing
Setting
|
Using
|
Typography
|
Improves the readability of text by enabling kerning and ligatures. Example:
|
Gradient Text |
Applying a gradient to text using Example:
|
Text Stroke |
Adding a stroke to text using Example:
|
Layout
|
Makes the element vanish, but its children become direct children of the element’s parent. Example:
|
iOS Specific Tricks
Native-like iOS Scrolling
Enabling native-like iOS scrolling using
|
Preventing iOS scrolling on certain elements.
|
SCSS Mixin for iOS Scrollable Elements
|
UIWebView Optimizations
Optimizations for UIWebView, such as disabling tap highlight color and user selection.
See: iOS WebKit UIWebView Remove Tap/Click Highlight Border with CSS |
Browser Hacks
Mozilla-only Hack
Targeting Mozilla Firefox using
|
Webkit-only Hack
Targeting Webkit browsers using
|
CSS Reset and Best Practices
Universal Reset
A basic CSS reset to normalize styles across browsers.
|
Element Normalization
Normalizing various HTML elements for consistent styling.
|