Technology News

Committing CSS Crimes

The time for CSS-Tricks is over. Now is the time for CSS Crimes!

In this current landscape of content service providers, users are often limited to expressing themselves in text, links, and images. Sanitization rules tend to strip out HTML, JavaScript, and various attributes.

Social media service Cohost allows users to have greater freedom with markup and inline styles than we may be typically used to. Some users have taken advantage of this freedom to commit CSS Crimes! It has resulted in creative recreations of familiar interfaces and interactive games by using properties in unconventional ways.

Blackle Mori created a contraption where pulling a handle slowly turns a series of gears, pulleys, and chains. Eventually an aperture opens to reveal the site’s mascot (“eggbug”) and the proclamation “Good Job!”. I have stared at this in Developer Tools and it is an amazing combination of grid, resize, transform, and calc(). I ended up adding a border to all <div>s to try and get a better understanding of how each individual element moved.

There have been situations in the past where I have been restricted from using the full toolkit of HTML, JavaScript, and CSS. There have been many instances of using decorative CSS shapes to get around images. I have used :hover as a workaround for mouseenter and mouseleave. I have used input:checked as a sibling selector for toggling.

While CSS Crimes are probably not something you would want to employ on a regular basis, we should embrace experiments within constraints that can foster creative solutions.

Direct Link →

Effective Tips For Becoming A Successful Designer
Designing for Long-Form Articles

Related Articles

Photoshop vs Illustrator

photoshop-vs-illustrator
If you are just starting out as a designer, deciding between Photoshop vs Illustrator might not be an easy task. So, we’ll lay out some facts for you to decide…

Just How Long Should Alt Text Be?

just-how-long-should-alt-text-be
I teach a class over at the local college here in Long Beach and a majority of the content is hosted on the Canvas LMS so students can access it…

Video Marketing: The Ultimate Guide

Video Marketing: The Ultimate Guide
Content-based marketing has become the gold standard for boosting brand awareness, reaching customers, driving web traffic, and increasing the bottom line. But there’s one area of content marketing that’s still…

Best Tax Saving Practice For Restaurants

best-tax-saving-practice-for-restaurants
Best Tax Saving Practice For Restaurants The year 2017 changed the definition of tax for both the experts and the taxpayers with the introduction of GST (Goods and Services Tax).…

Understanding And Managing The 4 Types Of Hybrid Workers

Understanding And Managing The 4 Types Of Hybrid Workers
Hybrid work isn’t a one-size-fits-all proposition. Here’s how managers can better understand and support different preferences and attitudes across their hybrid teams. How can managers better support hybrid workers? Google…