<style><\/code> blocks, which this script wouldn’t check. Heck, you might have integration tests that run in CI that use classes to do testing-related things. <\/p>\n\n\n\nI’d say this kind of thing is a useful tool for havin’ a looksie at classes that you have a hunch might be unused. But I wouldn’t say there’s a permission slip to run this thing and then yank out every reported class without further investigation.<\/p>\n","protected":false},"excerpt":{"rendered":"
Usually, when “unused” comes up in conversation regarding CSS, it’s about removing chunks of CSS that are not used in your site or, at least, the styles not currently in use on a specific page. The minimal amount of CSS is best! I’ve written about how this is a hard problem in the past. In […]<\/p>\n","protected":false},"author":3,"featured_media":272552,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[4],"tags":[1443],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/06\/unused-css.png?fit=1200%2C600&ssl=1","jetpack-related-posts":[{"id":167005,"url":"https:\/\/css-tricks.com\/spring-cleaning-unused-css\/","url_meta":{"origin":342198,"position":0},"title":"Spring-cleaning Unused CSS","date":"March 28, 2014","format":false,"excerpt":"Addy Osmani intros a Grunt task for removing unused CSS from your stylesheet before serving it. While this is certainly a worthy goal, I look at the quotes from people who reduced their stylesheets by 3\/4 or more and I'm like holy crap what kinda shop are you running over\u2026","rel":"","context":"In "Link"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":360928,"url":"https:\/\/css-tricks.com\/css-me-not-bookmarklet\/","url_meta":{"origin":342198,"position":1},"title":"Using the CSS Me Not Bookmarklet to See (and Disable) CSS Files","date":"January 14, 2022","format":false,"excerpt":"Stoyan is absolutely correct. As much as we all love CSS, it's still an important player in how websites load and using less of it is a good thing. He has a neat new bookmarklet called CSS Me Not to help diagnose unnecessary CSS files, but we'll get to that\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2022\/01\/CleanShot-2022-01-09-at-09.25.43@2x.png?fit=1200%2C890&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":332768,"url":"https:\/\/css-tricks.com\/animxyz\/","url_meta":{"origin":342198,"position":2},"title":"AnimXYZ","date":"January 18, 2021","format":false,"excerpt":"There are quite a few CSS animation libraries. They tend to be a pile of class names that you can apply as needed like \"bounce\" or \"slide-right\" and it'll... do those things. They tend to be pretty opinionated with nice defaults, and not particularly designed around customization. It looks like\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/01\/animxyz.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":312407,"url":"https:\/\/css-tricks.com\/analyzing-notion-app-performance\/","url_meta":{"origin":342198,"position":3},"title":"Analyzing Notion app performance","date":"June 8, 2020","format":false,"excerpt":"Here\u2019s a fantastic case study where Ivan Akulov looks at the rather popular writing app Notion and how the team might improve the performance in a variety of ways; through code splitting, removing unused vendor code, module concatenation, and deferring JavaScript execution. Not so long ago, we made a list\u2026","rel":"","context":"In "Link"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/06\/notion.png?fit=1200%2C790&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":348288,"url":"https:\/\/css-tricks.com\/we-had-90-unused-css-because-everybody-was-afraid-to-touch-the-old-stuff\/","url_meta":{"origin":342198,"position":4},"title":"“We had 90% unused CSS because everybody was afraid to touch the old stuff”","date":"August 18, 2021","format":false,"excerpt":"Over at the JS Party podcast: [Kend C. Dodds]: [...] ask anybody who\u2019s done regular, old CSS and they\u2019ll tell you that \u201cI don\u2019t know if it\u2019s okay for me to change this, so I\u2019m gonna duplicate it.\u201d And now we\u2019ve got \u2013 at PayPal (this is not made up)\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/06\/unused-css.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":351562,"url":"https:\/\/css-tricks.com\/just-in-time-css\/","url_meta":{"origin":342198,"position":5},"title":"“Just in Time” CSS","date":"September 10, 2021","format":false,"excerpt":"I believe acss.io is the first usage of \"Atomic CSS\" where the point of it is to be a compiler. You write CSS like this:
text <\/div> And it will generate CSS like: .C\\(\\#333\\) { color: #333; } .P\\(20px\\) { padding: 20px; } (Or something like that.)\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/09\/Screen-Shot-2021-09-08-at-8.59.19-AM.png?fit=1200%2C1021&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"featured_media_src_url":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/06\/unused-css.png?fit=1024%2C512&ssl=1","_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/342198"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=342198"}],"version-history":[{"count":6,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/342198\/revisions"}],"predecessor-version":[{"id":342349,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/342198\/revisions\/342349"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media\/272552"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=342198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=342198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=342198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}