jamesnguyen101 / google-diff-match-patch

Automatically exported from code.google.com/p/google-diff-match-patch
Apache License 2.0
0 stars 0 forks source link

javascript version shouldn't put style="background-color"... #65

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
More of a suggestion, but the styles should be handled by CSS rather than 
hardcoding background colors into the output. <span> tags aren't really needed 
either and should be optional.

Original issue reported on code.google.com by alan.wit...@gmail.com on 15 Feb 2012 at 8:41

GoogleCodeExporter commented 8 years ago
As it says on the API page, "This function is mainly intended as an example 
from which to write ones own display functions."

By all means, use CSS in your application.  But for a basic "Hello World" 
display function, I wanted it to be as simple as possible.  Adding CSS to the 
page (what page, where?) is an extra level of complexity.

Original comment by neil.fra...@gmail.com on 15 Feb 2012 at 9:19

GoogleCodeExporter commented 8 years ago
"Adding CSS to the page (what page, where?) is an extra level of complexity."

I'm adding the CSS to my own page. I'm not asking the javascript code to add 
the CSS.

I think you should just take the background-color out and add it to your demo 
page.
That's where the "hello world" code should exist, not the actual library. A 
library should be simple and clean as possible without assuming anything about 
the application. Let the end-user pretty it all up.

Original comment by alan.wit...@gmail.com on 15 Feb 2012 at 9:30