31

Recently, I posted an answer to an old CSS question that uses a modern technique to enable something which—to the best of my knowledge—previously wasn't possible to accomplish properly with CSS.

Before I posted my answer, I sifted through the mountain of answers and couldn't find an answer using the new technique. A little while later, a user commented that there was an existing answer that uses the same technique.

That answer didn't really explain the technique; it just used it in code—which is probably why I didn't see it before I posted.

What is the best thing to do in this case?

  1. Delete my answer,
  2. Link to the existing answer in my post,
  3. Do nothing, or
  4. Something else?

My answer was subsequently deleted by a moderator, so it seems I should have deleted the answer myself in such a case. Unfortunately, this leaves the former answer buried amongst a mountain of other older answers, unlikely to be noticed.

7
  • 5
    One problem I see with the answer is that it is not written to age very well, it is very much tied to this very time period. Maybe it is true that the pure CSS solution wasn't possible across all browsers until now, but a year from now that is already ancient history. Take away that aspect of your answer... and it becomes pretty much a less detailed code-only answer comparable to the existing answer. On top of that: CSS is in the range of tags where an explanation can be treated as fluff, so even if the text was more useful... I don't think the average css tag consumer sees it that way.
    – Gimby
    Commented Feb 6, 2023 at 11:27
  • 13
    @Gimby, thanks for the tip about not aging well (I'll see what I can do to improve ;)), but regarding "CSS is in the range of tags where an explanation can be treated as fluff" - I'd have to disagree about that
    – Danield
    Commented Feb 6, 2023 at 11:52
  • 2
    Of course you have to disagree with that :) But don't be too shocked when this happens again. Given the "how to" nature of the question, at least. It was not written to be educated. It was written to make a problem go away.
    – Gimby
    Commented Feb 6, 2023 at 12:31
  • 4
    [1] While the existing answer didn't provide much explanation, it did state "I wrote a blog post about these techniques", and linked to that lengthy blog! Moreover, your answer didn't provide much more in the way of explanation, and also linked to a blog! Given all that, surely the appropriate thing to do was delete your answer, then edit or comment on the the existing answer as appropriate. [2] I'm not sure why you wrote "Finally, a pure CSS solution" at the start of your answer since several older answers were also pure CSS solutions.
    – skomisa
    Commented Feb 7, 2023 at 18:06
  • 1
    @skomisa - to the best of my knowledge - they weren't really solutions, they were more like workarounds which didn't really produce the desired result... but I guess I could have left that headline out :)
    – Danield
    Commented Feb 7, 2023 at 18:12
  • 6
    @Gimby "CSS is in the range of tags where an explanation can be treated as fluff" Citation needed. This sounds like something someone who doesn't understand CSS might say.
    – TylerH
    Commented Feb 7, 2023 at 20:30
  • 5
    "this leaves the former answer buried amongst a mountain of other older answers, unlikely to be noticed" Adding more answers won't make it more visible either. It would just increase the mountain. I miss "edit the existing answer to make it standing out better" in the list of actions. That also gives authorship, even though not rep (but who cares about that anyway). You would then be officially a co-author of one of the best answers to that question. Commented Feb 7, 2023 at 20:44

3 Answers 3

36

If you think it adds value, just leave it. If you didn't rely on the prior answer, there's no credit to give. For a given technique, there can be many different presentations. After all that is essentially why a question post is allowed multiple answers. Alas, it seems like the more answers a question has, the worse almost all of them are. So if there are multiple distinct techniques for an answer, one would expect a couple of good answers & a bunch of bad ones per technique. Hopefully yours can be one of the good ones.

10
  • 7
    If you didn't rely on the prior answer, there's no credit to give. After realizing that an existing answer had already suggested the same technique, a later answerer should acknowledge the earlier answer some way. For example, "X's answer to [reiterate] is a good approach. I'd like to further explain|recommend|caution|etc..."
    – kjhughes
    Commented Feb 6, 2023 at 14:44
  • 23
    I stand by what I wrote & disagree. Not all content is novel. Most content isn't novel. PS And giving credit, like all content, shouldn't involve noise.
    – philipxy
    Commented Feb 6, 2023 at 14:46
  • 2
    Courtesy does not demand novelty.
    – kjhughes
    Commented Feb 6, 2023 at 14:52
  • 4
    Courtesy is noise. But I don't know what you're trying to say. PS Again: If one generates content independently in a Q&A, no credit need be given. PS The noise I was referring to in my last comment was everything in your example credit text that wasn't just naming the source of content not self-generated. (And I thought & think that my meaning was obvious.)
    – philipxy
    Commented Feb 6, 2023 at 15:01
  • 5
    Courtesy and the example prose I suggested provide more signal than you're realizing here. They acknowledge the merit of a predecessor's contribution. They help future readers to easily spot the value-add. Finally, articulating the value-add helps ensure that there is indeed something new and useful to note; otherwise, the merely overlapping answer ought to be removed.
    – kjhughes
    Commented Feb 7, 2023 at 15:20
  • 2
    This was my gut feeling too - that I should just leave it alone... Frankly, I'm quite surprised that the moderator decided to delete the post based on the fact that my answer used the same technique... there are probably dozens of answers on that very question which are essentially 'duplicates'! and only 1 answer somewhere in the middle of those 87 answers with an answer which I believe is actually useful today (based on the updated CSS features) :)
    – Danield
    Commented Feb 7, 2023 at 17:40
  • The endless poor uncurated posts don't make more poor posts OK. Re the deletion the comments on your question explain that value wasn't added. A later duplicate answer is not helpful & merits deletion.
    – philipxy
    Commented Feb 7, 2023 at 18:42
  • 1
    @philipxy I don't believe my answer was poor; I believe users searching for an answer would have found it to be very useful... On the other hand when compared with the older answer I do agree that my answer wan't adding much value.. that was the whole basis of my question here on meta
    – Danield
    Commented Feb 7, 2023 at 19:12
  • 1
    "For a given technique, there can be many different presentations. After all that is essentially why a question post is allowed multiple answers." There's a difference between one solution dressed up two ways vs two independent solutions. The latter is why multiple answers are allowed on questions (among other reasons), not the former.
    – TylerH
    Commented Feb 7, 2023 at 20:56
  • @TylerH "two independent solutions" Like I said, when value is added, therefore 2 different solutions, whether overlapping is irrelevant.
    – philipxy
    Commented Feb 8, 2023 at 0:18
13

Generally one should refrain of posting a new answer to these kind of super-active old questions with tons of views and answers. Unless there is truly something missing in all the posted answers or if they are sloppily written and you can do much better.

Because otherwise it is very unlikely that answer number #87 will add something that wasn't already said. In your case it doesn't seem anything revolutionary was added that wasn't already said in the one you linked and they are pretty much of the same quality, far as I can tell. So the correct action is to delete your answer.

In case you can make an argument why your answer is better or unique, then leave it (and dispute deletion on meta). But since you seem to agree that your answer was a duplicate, then just leave it at that.

11
  • 10
    I've never seen it as far as #87 but I've seen a question with a dozen wrong answers, and the right answer as the lowest answer, and deleted to boot. Flagging such beasts results in moderators complaining about it so I stopped doing that.
    – Joshua
    Commented Feb 6, 2023 at 15:22
  • 2
    @Joshua These threads are best maintained by a group of gold badgers with the relevant knowledge, css gold badge in this case. If you manage to rally 3 or so gold badgers (in the SOCVR chat for example) and get consensus what to do with one particular answer, you can go ahead and delete it without the aid of mods (whom might not have the necessary domain knowledge).
    – Lundin
    Commented Feb 6, 2023 at 15:54
  • 2
    "... refrain ...posting a new answer to these kind of super-active old questions with tons of views and answers. Unless there is truly something missing in all the posted answers" - Well, yes, CSS progressed and now there is a viable solution. So I do think there was a good reason to post.
    – Danield
    Commented Feb 6, 2023 at 16:42
  • 1
    @Danield Your OP says that yours was a duplicate of the "viable solution," so I disagree that there's a good reason to post. Instead, comment or edit if there's additional detail needed. Commented Feb 6, 2023 at 20:35
  • 3
    @Michael, well actually, I made it clear that I posted because I didn't see that answer :)
    – Danield
    Commented Feb 7, 2023 at 11:07
  • I mean I mostly disagree with the notion of posting a new answer to an old question. There's a reason that this isn't super restricted.
    – Makoto
    Commented Feb 7, 2023 at 17:51
  • 3
    I agree with all that, except to add the caveat that it is highly appropriate and desirable to write answer #87 (as Danield attempted) if it addresses some new feature/functionality/technology that didn't exist when the question was asked, and is not addressed by any of the existing answers. The problem, as Daniel acknowledges, is that it is tough to wade through 86 existing answers to be sure that you are posting new information. Unfortunately it's not that unusual to see answers and comments that start with "I didn't check all the existing answers, but....".
    – skomisa
    Commented Feb 7, 2023 at 19:36
  • If only we had, like, "super" users who could go through a question and, using their best judgement, delete all of the duplicate/not relevant answers from time to time. Surely there isn't more than maybe 4-5 total unique answers there.
    – Kevin B
    Commented Feb 7, 2023 at 19:38
  • 1
    ....One approach that would help for questions with many answers is to review them all and zap the duplicates, but who wants to volunteer for that miserable task?
    – skomisa
    Commented Feb 7, 2023 at 19:39
  • 1
    @skomisa "the problem is that it is tough to wade through 85 existing answers" That's the answerer's problem (if it's really even a problem), and also their responsibility. Ignorance of existing content is not an excuse to repeat it.
    – TylerH
    Commented Feb 7, 2023 at 21:23
  • @TylerH Yes, of course it's the answerer's responsibility, but I'm not remotely justifying the behavior; I'm just explaining it. Lundin is correct in stating that "Generally one should refrain of posting a new answer to these kind of super-active old questions with tons of views and answers".
    – skomisa
    Commented Feb 8, 2023 at 0:51
13

A moderator already decided this for you and deleted your answer, so it can't be undeleted unless they or another moderator decide to undelete it. To your comment about them not deleting other answers which repeat or iterate on existing solutions in that thread, moderators only delete answers that are flagged, or that they can tell are exact duplicate solutions (in the context of duplicate answers). It's a lot of work to go through pages of answers and check whether solutions are the same, even when you know the language well, so they tend to rely on users to flag existing content. That being said, if you see answers there or anywhere that repeat existing answers under the same question, please do flag them for a moderator and explain which answer(s) they duplicate, because no one likes duplicated answers.

It's worth mentioning that I also voted to delete it because it provided the exact same implementation as the answer from a year ago. Not just the same general idea; the exact same implementation:

.parent {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: 1s;
}
.child {
    min-height: 0;
}
.parent-but-activated {
    grid-template-rows: 1fr;
}

The rest of the CSS is just stylistic/illustrative.

Now, this isn't a very in-depth solution in terms of lines of code, so I can understand the argument of "we both came up with the idea of rounded corners at the same time". Unfortunately, where answers on Stack Overflow are concerned, that doesn't mean you can still post the same solution later on; that's just repeating content.

However, I didn't vote to delete it just for this reason. As you mentioned, you got the solution from Chris Coyier. While I'm betting Chris got it from the other answerer's blog, which predates Chris' article linked from your answer, the other issue at play here is that you are just copying, wholesale, a solution from another site; wholesale copies of other peoples' content without added value or context is frowned upon at Stack Overflow, especially if you don't put the entire post in block quotes to indicate it's from somewhere/someone else, or mark it as a Community wiki answer (which is strongly recommended when you're sharing an answer that someone else came up with).

Others have already talked about the meta commentary regarding "finally, a CSS solution", which never belongs in any CSS answer to any question, even in cases where that statement is true.

1
  • 3
    Harsh but fair. And since you have highlighted that a portion of the code was identical to that in the earlier answer, deletion of the offending answer is surely the correct approach. Also, the attribution for the code in the deleted answer was sloppy at best.
    – skomisa
    Commented Feb 8, 2023 at 1:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .