News for hackers. Stuff that matters.
Re:Markdown.css – Make HTML look like plain-text markdown by ComputerGuru on Wednesday December 28, 2016 @07:16PM (#13274814)
I don't get all the hate for this. I think it's very nifty and actually has a number of easy applications right off the top of my head. You've basically just built an html-to-plaintext conversion utility, using your browser's HTML parser/render instead of writing your own. You've taken a difficult-to-parse syntax and changed it to plaintext, after which it can be marked up (or down) as needed for whatever application you have in mind.

Cool.

(immediate "tags" that my brain went to upon seeing this: printer mode, accessibility modes for visually impaired, text-to-kindle, text-to-audio)

Re:Markdown.css – Make HTML look like plain-text markdown by lisper on Wednesday December 28, 2016 @09:47PM (#13275357)
> You've basically just built an html-to-plaintext conversion utility

That's not what this is. Try copying the markdown so you can edit it as you suggest and you will find it doesn't work. The output looks like markdown, but it isn't markdown, and that's the source of the negative reactions. Having a one-to-one correspondence between representation and rendering is the main thing that makes markdown useful. Making something look like markdown but not actually be markdown strips it of nearly all of its utility.

Re:Markdown.css – Make HTML look like plain-text markdown by coldtea on Thursday December 29, 2016 @03:28AM (#13276291)
>Having a one-to-one correspondence between representation and rendering is the main thing that makes markdown useful.

And looking simple with minimal formatting is the second thing. This idea taps on that second thing.

Re:Markdown.css – Make HTML look like plain-text markdown by lisper on Thursday December 29, 2016 @08:53AM (#13277232)
If that's your goal, and your source is already in HTML, then the best solution is no CSS at all.
Re:Markdown.css – Make HTML look like plain-text markdown by dannypgh on Thursday December 29, 2016 @09:09AM (#13277316)
Isn't the default styling of HTML in browsers mostly just due to historical accidents?
Re:Markdown.css – Make HTML look like plain-text markdown by lisper on Thursday December 29, 2016 @04:47PM (#13280437)
Probably. So?
Re:Markdown.css – Make HTML look like plain-text markdown by chx on Thursday December 29, 2016 @01:31AM (#13275996)
It only needs a little JS to make it work, though. You just need to manipulate the selected text as described here http://stackoverflow.com/a/36582615/308851 and https://github.com/niklasvh/jquery.plugin.clipboard here.
Re:Markdown.css – Make HTML look like plain-text markdown by blowski on Thursday December 29, 2016 @05:11AM (#13276570)
So

1. Take some HTML

2. Use CSS to make it look like Markdown

3. Use JavaScript to make it behave like Markdown.

Why not skip step 2?

Re:Markdown.css – Make HTML look like plain-text markdown by chx on Thursday December 29, 2016 @05:23AM (#13276609)
Because it's masterful to use CSS for this and the required JS is simple and generic.
Re:Markdown.css – Make HTML look like plain-text markdown by lisper on Thursday December 29, 2016 @05:56PM (#13280946)
Rewriting TeX in Brianfuck would be masterful too. That doesn't make it a good idea.
Re:Markdown.css – Make HTML look like plain-text markdown by clusmore on Wednesday December 28, 2016 @08:39PM (#13275122)
Why does everything need to serve a purpose? I can believe the author wrote this just "Because I Can", which is a perfectly good reason to me. Most stuff I work on in my free time, I do just for me. If I think anybody else might be interested in it, not necessarily because it's useful but just because it's interesting, then I share it.

Edit to add: Not suggesting that you think it needs to serve a purpose, this just felt like the most appropriate thread to add my comment to.

Re:Markdown.css – Make HTML look like plain-text markdown by Retr0spectrum on Wednesday December 28, 2016 @07:24PM (#13274849)
I agree that this is cool, but it doesn't usefully convert back to plaintext, since the pseudo-elements don't get selected with the rest of the text if you try to copy and paste.