Jan. 15, 2022, 2:35 p.m. | Al Nahian

DEV Community dev.to



Who doesn't like Dark Mode? In this CSS Hack, you'll learn about How To Convert a HTML Page to dark theme just using a single CSS property.

Let's see it in quick action!


In this post, we'll talk about a simple CSS filter property, which will invert colors and help us to get a Dark theme page instantly.

And the Magic Property Is:



html {
filter: invert(100%) hue-rotate(180deg);
}


I don't feel comfort reading documentation websites for a long duration, …

css dark hack html mode tutorial

SOC 2 Manager, Audit and Certification

@ Deloitte | US and CA Multiple Locations

IT Security Manager

@ Teltonika | Vilnius/Kaunas, VL, LT

Security Officer - Part Time - Harrah's Gulf Coast

@ Caesars Entertainment | Biloxi, MS, United States

DevSecOps Full-stack Developer

@ Peraton | Fort Gordon, GA, United States

Cybersecurity Cooperation Lead

@ Peraton | Stuttgart, AE, United States

Cybersecurity Engineer - Malware & Forensics

@ ManTech | 201DU - Customer Site,Herndon, VA