3 ms·
> Now, moving this specific button 3px to the left could be as easy as a `margin-left: -3px` or some other simple line of code, but that is a hack/code smell th
by exizt88 13y ago
> Now, moving this specific button 3px to the left could be as easy as a `margin-left: -3px` or some other simple line of code, but that is a hack/code smell that will be met with contempt from everyone who looks at it in the future
Yep, that's a compromise. But if it makes the product better overall, it must be done. If the designer says so, I believe them -- and if I say that a designer's request would lead to a significant setback for our production schedule, they believe me. It's not the matter of designer/developer interaction, it's the matter of product value.
I too abhor such things, but when a designer asks for it, I do "position: relative; left: 3px;". This is exactly what relative positioning was made for, and it makes the developer's intent obvious.
- ricardobeat 13y agoposition:relative creates a new stacking context that could interfere with other styles. Anyway, one-off hacks like that every full moon are not an issue to most developers, but you'll usually see they come in a constant trickle; after experiencing that for a couple years a strong emotional response naturally develops :)
- kaishiro 13y agoThere's no point in arguing about this without context, since it's really all about the context. That is to say - depending on the framework/code base/whatever you're working in, just "do[ing] position: relative; left: 3px;" for a specific page element could actually be quite a chore. Not just now, but for the next guy as well.