Story time!
For further actions, you may consider blocking this person and/or reporting abuse
Story time!
For further actions, you may consider blocking this person and/or reporting abuse
Robert Slootjes -
Om Vaja -
Probir Sarkar -
ANIRUDDHA ADAK -
Top comments (41)
I worked at a fortune 10 company, that had a 8 year old enterprise CMS. This is code for bulky, slow, confusing, and difficult to use.
The interesting this, is that the vender that owned the platform, had to outsource a lot of work to 3rd parties to meet timelines over the years.
So you ended up on pages that had knockout.js, jQuery, angular, and who knows what else all in the same place.
Well given the state of the JS, I am guessing you can assume how bad the CSS was. There was nothing to make it easier to write, no SASS or LESS.
It was all in a few single files. Nothing bundled them together.
Because some parts of the app were done in isolation, they may have had there own CSS that was not namespaces. So something could work everywhere but on that one page.
It was great.
Full disclosure, I convinced the business to start over and spent my next years at the company building a new platform they use today.
I feel bad for my colleges that got stuck maintaining the old one while the new one came to life...
So it was a full-on parallel rewrite?
How much of the change was HTML and how much was within the CSS?
It was everything.
The previous platform was on a CMS that was past end of life. The vendor no longer supported it. They had inherited it from a outside agency that use to do the IT and they were insourcing it.
The old sites were not responsive. They were dated. And we as a company did not understand them completely. For example, adding a 5th option to the top level omni-menu for on brand, broke it for the other brands in production. It slipped through QA. And that was 5 weeks to add essential another LI and Anchor tag.
So the replatform was a new design, newer tech stack with an updated version of the same enterprise CMS.
We made a strong case of all the problem areas it would address. With the vision on a long term future. Like no modifying the core CMS to the point you remove yourself from any upgrade path.
So from that point we got to throw away the old CSS. But because the project takes years to do, teams had to maintain the old product.
Basically, there were multiple white label brands, each with many internalized sites, sometimes over a hundred.
It would take 10k content authors around the world, about 5 years to launch all new sites in all markets. And that is after all the UI, authoring interface, and development was done.
They still may not be finished in smaller markets. I left the company a few years ago.
Well, I had once assumed that
vw
andvh
were good units for cascading font sizing throughout my whole UI.I still have nightmares to this day.
Would never do that on a client website but I am quite sure I still have a CSS rule that does exactly that on my personal website.
I set out to rebuild my website to be the best I could do and honestly it doesn't at all. It is quickly climbing my "I dont want to deal with this" list.
"CSS: The !important Wars"
This would be great on a t-shirt.π€£
The sequel will be βCSS: the z-index strikes backβ π
Yup! Since I had this issue, I now follow this global variable approach:
Everything on the page that could overlap is defined above.
Everything that I write
The horror when you realize that people begin adding inline css rules with
!important
...I regularly work with HTML email code. Styling
<table>
cells, writing inline CSS styles, designing with CSS2 support, and the like.But thing is, I like it π΄ββ οΈ
Do you know of any good resource on best practices for writing email-friendly html/css? MailChimp have some guides but leave out all the important special sauce! I once started writing an email template for use in RMarkdown, eg. to convert a markdown post to be email friendly.
Yes, I have a couple!
I had to deal with a system that has lot of !important in pure css files along different folders in the project. The files were loaded sometimes twice in a page (because different modules was loading same .css). There was so many !importants that nothing was important anymore. I had to discover the scope and logic of dozens of files and re-arrange/re-order/re-write them all. Bad days :/
Saving this for future use.
Ok. There's a chance this is still out there, on a site with tens or possibly hundreds of thousands of regular users, so I'm not going to be too specific.
So the HTML was full of DIVs as text holders instead of proper semantic emelents, full of non-semantic junk utility classes and, importantly, this thing called
fw-500
. What's that, then?There were several CSS files with names like
grid-768.css
,grid-980.css
, etc. You can guess what these were for, right? Right. So you'd have media queries in them like so:Yes, there were (usually) 1920 of these lines. I only hope they generated them in the first place rather than typing them by hand, but who knows.
This was a crude column array, down to pixel level, that could be varied depending on viewport size even though you thought you were working only at desktop sizes.
But the filename didn't always match up with the media query it was using, because Things Change.
And then... and then a lot of the sizes had non-matching widths because of off-by-one error fixes or discrepancies between
box-sizing
in different browsers and so on.One of the worst CSS I usually have to deal with every once in a while looks something like this:
One of my colleagues thinks it's best to write "COMPRESSED" CSS from start instead of compressing it later on.
Somehow that has been my experience with every bootstrap based site I've had the pleasure to get my hands on.