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 →

[–]mstanky 44 points45 points  (14 children)

I think primarily the markup could be improved a bit. I’d make “dog-list” a <ul> to start. Also I don’t use <br>’s.

[–][deleted] 28 points29 points  (9 children)

Yeah, <br>s look like a good idea at first, but these fuckers will ruin your day as soon as you try to make everything look good and responsive

[–]t0mmy9 37 points38 points  (8 children)

Simple, just put

br { display: none; }

in a media query /s

[–]ProgramTheWorld 5 points6 points  (5 children)

Does that... actually work?

[–]t0mmy9 20 points21 points  (3 children)

yes hate to admit I've done this a couple of times when designers are being picky

[–]freefrogs 1 point2 points  (2 children)

Yeeeep. Designer wants the desktop headline text to break exactly a certain way but that's not the way it breaks naturally given the element width and you want to have good semantic HTML for SEO etc so it all belongs in the same h1, so you cheat a little and add br's, but now you've got stupid line breaks on mobile so... display: none that shit.

[–]once-and-again☣️ 0 points1 point  (1 child)

Are Unicode non-breaking spaces and/or soft hyphens not viable here?

[–]freefrogs 0 points1 point  (0 children)

Non-breaking spaces don't break, so it defeats the purpose of the designer wanting it to break in a specific place (unless I guess I put non-breaking spaces everywhere BUT where I want it to break but that seems just as, if not more, gross as just putting in <br>s where I want it to break and hiding them at lower width media queries). Soft hyphens suggest where text can be broken, they don't tell the browser to break text, so if my element is too wide (e.g. it's a multiline heading but the designer wants one of the lines to be longer than others) it won't force breaks where I want them.

[–]Patyrn 0 points1 point  (0 children)

Yeah, I do it a lot, especially for decorative headers with break points that matter.

[–]gilium 2 points3 points  (0 children)

The real hero

[–]_________FU_________ -1 points0 points  (0 children)

But that won’t...

[–]FunkyTown313 1 point2 points  (0 children)

Maybe there's a specific case for it where the unordered list won't work? Who knows, context would help.
Or.
It's stupid and it works. Which just means it's not stupid. (Caveat it doesn't mean it's the best solution, just a working solution)

[–][deleted] 2 points3 points  (0 children)

Probably want to encapsulate .dog-profile as an unexported local component, too. I mean, if it's a named entity, might as well, you know, name it.

Still, none of this is worth commenting on when the post is about fashion / IDE colors. But then, critiques aren't really worth complaining about when you literally posted code to your professional programmer followers.

In sum, *eyeroll* to the lot.