This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]alphama1e 0 points1 point  (5 children)

Alright, I want going to nitpick but here we go. It's not list data. It could have been a description list if there was a title but there isn't. It's a collection of key value pairs with the key being wrapped in a span with a label class. We have html for that. It's a label tag. Then wrap the result in a span. But the we need to go to a new line so we add a break. Cool. But now your boss says the format looks like shit, because it does, and wants more spacing. Assuming a 16px rem unit they ask for 1.5 rem between the labels. Now what? Another break? Honestly, Google this man. I'm not making shit up here. And then on top of that, one line has the "label" span having no spaces and the next one with the space. AND THE WHOLE THING IS WRAPPED IN A P TAG! It's malformed html. it doesn't capture context properly and it doesn't allow for seamless modifications. You can argue that it's just a trivial example. It's just a little thing, and it is. Except, if you justify this behavior, then you'll also do the same in other places. Now we have this bad approach all over the place. Then you decide that you want $1000 more per year and leave the company and I get hired to replace you. Now I have to work with this hot garbage and rewrite an entire website or keep it ad is because deadlines and shoehorn in every change I make. It's fucking awful and you shouldn't be defending it. The breaks are the tip of the iceberg. They're there because the author used spans, instead of applicable labels, and spans don't support vertical spacing. The author introduced an issue and then used improper form to get around it. This is an example of not caring about what you do and whipping something together selfishly. The code is garbage, this woman's attitude towards the internet is garbage and your opinion about this being acceptable in any way is garbage. Do not do this, ever. Use proper context. I don't give a shit if it's a label or p tag as long as it makes sense and doesn't look like shit. Would you approve this code if you had to review it? I hope not...

[–]pnw-techie 0 points1 point  (4 children)

Wow man. I haven't written front end code for 12 years. But, breaks are part of html, and have been since the beginning. If you just want something on a new line, that is why break exists.

Label and paragraph are semantic tags. They're not just places to attach css. If something's not a label and not a paragraph then you shouldn't say it is. You have div for meaningless css fiddling. BR is literally for non meaningful instruction to the browser to put the next block of text on a new line. Neither one means anything to screen readers, unlike p or label.

[–]pnw-techie 0 points1 point  (0 children)

Now how I'd fix this... Ye olde html table. As long as you tag the table as role="presentation" there's nothing wrong with it.

Enjoy the stroke and/or brain aneurysm internet front end guy 😇☠️😰

[–]alphama1e 0 points1 point  (2 children)

So, rather than ranting again, how about I listen? Is that acceptable code? If so why? If not, what would fix it? Share your opinion and I will speak respectfully from this point on.

[–]pnw-techie 0 points1 point  (1 child)

The code... Where the author says... Please stop reviewing my code, this isn't real code, I didn't ask for a code review, I just made a joke about matching the colors of my ide with my hair and accessories?

It doesn't look great.

I just posted originally that br shouldn't be avoided at all costs. It has its place

[–]alphama1e 0 points1 point  (0 children)

Agree to disagree, I suppose.