News for hackers. Stuff that matters.
Re:Show HN: This page is a truly naked, brutalist HTML quine by LeonB on Tuesday June 04, 2019 @10:00AM (#20095064)
I can’t think of a way to do that. When content is added via css it’s not selectable. Maybe fork it and see what you can do? https://github.com/secretGeek/html_wysiwyg/
Re:Show HN: This page is a truly naked, brutalist HTML quine by uryga on Tuesday June 04, 2019 @08:41PM (#20100562)
i'm on my phone, but wouldn't something like this work?

  *::before, *::after {
    user-select: text; // or `all`?
  }
Re:Show HN: This page is a truly naked, brutalist HTML quine by LeonB on Tuesday June 04, 2019 @09:19PM (#20100715)
I had a look into it; user-select doesn't apply to before/after content.

This process has taught some interesting things about browsers. For example: `<br>` and `<img />` elements are "replaced" and can't really be shown in the way all other elements are. (I conveniently avoided using them).

And, as described above, ::before/::after content cannot be selected, and generally behave... strangely.

Re:Show HN: This page is a truly naked, brutalist HTML quine by neogodless on Wednesday June 05, 2019 @08:55AM (#20103849)
`<hr>` too? And `<marquee>`?

Did you see any variance between browsers? Hopefully not, with "common" CSS like this, but it would be interesting.

Re:Show HN: This page is a truly naked, brutalist HTML quine by coreymatyas on Tuesday June 04, 2019 @09:20PM (#20100718)
CSS spec says no, unfortunately. Pseudo-elements aren't part of the DOM and thus can't be selected by any means.
Re:Show HN: This page is a truly naked, brutalist HTML quine by LeonB on Tuesday June 04, 2019 @09:29PM (#20100759)
the only approach remaining would be to have some minimal vanilla js, as part of the page, that rewrites the dom to include the tags.

This would also alleviate the need to use CSS, and in particular the repetitive CSS.

It would also allow the tags/attributes to be styled in a more idiomatic way.

But i'm out of time on this idea ;)