DEV Community

Discussion on: Tell me about the worst CSS you've ever had to deal with

Collapse
 
jwp profile image
John Peters

I was hired to add new function to an in store application for a major electronics retailer. This Order Management system was written in AngularJs by a team of 2.

The app mixed in gui directives and open source animations. All tied very tightly together using Less.

Any small change broke the entire layoutl. Each time it required hours of debug time to find and fix. The worst were the directives because they ran within Angular's layout cycle.

This meant putting in debug statements which were only needed on the 20th time. The stacktrace showed the caller to alwys be Angularjs which was being invoked at any random unrelated async call. The directives were entry points into components controlled only by Angularjs cycles.

The devs had been let go two years earlier. I was first to ressurect project. Due to internal security our local instances could not reach internal servers to run. This meant every change had to be deployed to a dev machine.

How many tweaks are made to css/less? Probably 100 per day. 100 deployments eats up major time.

Take away... debugging css can be extremely hard. Especially when layout is not fluid. Directives which alter GUI open up entry points out of logical control and become very difficult to debug. Open source animation components,when they don't work, drag you into their internals to fix, this can take days. Internal security rules can be major impediment.

Finally, Grunt is evil.