LD
Change your colour scheme

It's CSS Naked Day

Published:

It’s CSS Naked Day[1], so to celebrate I’ve stripped all of the CSS from my blog.

I’ve added a quick Nunjucks shortcode to make it easier, so the CSS should automagically reappear tomorrow morning:

  eleventyConfig.addGlobalData('isCSSNakedDay', () => {
const dateObj = new Date();

return dateObj.getMonth() === 3 && dateObj.getFullYear() === 2024 && dateObj.getDate() === 9;
});
{% if not isCSSNakedDay %}
<link rel="stylesheet" type="text/css" href="/assets/css/styles.css">
{% endif %}

Thankfully I’ve not spotted any terrible layouts (yet) due to missing CSS, which I’m happy about. The colour scheme changer is a bit redundant though. I’ve also left the FontAwesome and Prism CSS files in, just because otherwise things’ll stop rendering at all there which wouldn’t be great for a lot of posts.


  1. Please only strip the CSS from your own websites, not your employers’ ↩︎

Tags:

About the author

My face

I'm Lewis Dale, a software engineer and web developer based in the UK. I write about writing software, silly projects, and cycling. A lot of cycling. Too much, maybe.

Responses