Tag Archives: Coding

Zoomed out HTML and CSS with a stupidly long class name.

Did you know that CSS class names can be pretty much infinitely long?

File this under some obscure CSS bullshit that few people will ever need to know.

I hired a great developer to build a WordPress plugin that would import an uploaded Excel file on the back end and then use it to fill out copy on a website based on a shortcode.

Basically I could use a shortcode like (row=4 A B C) to mean that it would take row 4 of whatever spreadsheet, and then display cells A1 and A4, then B1 and B4, then C1 and C4.

The idea is that the column headers are the data labels, so if row 1 is “Name: ” “Age: ” “Height: ” and you have a bunch of data beneath it, this plugin is a quick way of displaying “Name: John” “Age: 34” “Height: 6 Feet” on a page, if that’s the data in row 4.

I also wanted to pull this text into CSS classes around each element, so it would dynamically put class=”John” (for example) around the “John” text on the website. That way I could have the flexibility to style things across the site easily, like if I wanted every person named John to be blue text, boom, one line of CSS.

Unfortunately I had to get two revisions made because of obscure (to me) facts about CSS class names.

Continue reading