SitePoint
Blog
Forum
Library
Login
Join Premium
Toggle sidebar
Modern CSS
Toggle community discussions
Close
Content
Bookmarks
Preface
Modern CSS
Notice of Rights
Notice of Liability
Trademark Notice
About SitePoint
Conventions Used
1
Using CSS Transforms in the Real World
Vertically Aligning Children
Creating Arrows
Creating a “Jumping Ball” Loader
Creating a “Spinner” Loader with SVG
Creating a Flip Animation
A Word of Caution
Conclusion
Variable Fonts: What They Are, and How to Use Them
How We Got Here
Variable Fonts
Using Variable Fonts
Using font-variation-settings
Performance
Scroll Snap in CSS: Controlling Scroll Action
Real World Use of CSS with SVG
SVG Benefits
SVG Tools
SVGs as Static Images
HTML-Inlined SVG Images
SVG Sprites
SVG Effects on HTML Content
Portable SVGs
Sophisticated SVGs
CSS and PWAs: Some Tips for Building Progressive Web Apps
What are PWAs?
What is Required for Developing PWAs?
CSS and PWAs: Some Considerations
PWA Frameworks
PWAs and Performance
Wrapping Up
20 Tips for Optimizing CSS Performance
1. Learn to Use Analysis Tools
2. Make Big Wins First
3. Replace Images with CSS Effects
4. Remove Unnecessary Fonts
5. Avoid @import
6. Concatenate and Minify
7. Use Modern Layout Techniques
8. Reduce CSS Code
9. Cling to the Cascade!
10. Simplify Selectors
11. Be Wary of Expensive Properties
12. Adopt CSS Animations
13. Avoid Animating Expensive Properties
14. Indicate Which Elements Will Animate
15. Adopt SVG Images
16. Style SVGs with CSS
17. Avoid Base64 Bitmap Images
18. Consider Critical CSS
19. Consider Progressive Rendering
20. Learn to Love CSS
Advanced CSS Theming with Custom Properties and JavaScript
Understanding :root and var()
CSS Custom Properties vs Preprocessor Variables
Writing a Simple HTML Page
Writing Basic CSS for Our HTML Page
Adding a CSS Dark Theme
Switching Themes with JavaScript
Changing CSS Custom Properties with JavaScript
Conclusion
Open text modal
Community Questions
Close