[Webkit-unassigned] [Bug 8374] Creation of HTML with webkit causes extraneous output - should better utilize css over inline style
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Fri Apr 14 06:01:48 PDT 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=8374
------- Comment #4 from james at imajes.info 2006-04-14 06:01 PDT -------
(In reply to comment #3)
> Wow thanks for your feedback! I have a few comments:
>
> > <div>
> > <br class="khtml-block-placeholder">
> > </div>
> >
> > whilst the div's are probably unnecessary
>
> When you hit return you're ending a paragraph and starting a new one, not just
> adding a line break. You want the new paragraph to be set apart from other
> paragraphs in the same way that the paragraph you just left is. So, if divs
> have any padding or margin, you need a div.
>
this goes back to your later response about using DIV rather than P - when you
end a paragraph, you should denote it in semantic markup, ie with a </p>. You
could then use the br after to manage your spacing with the -khtml style.
> > this code is OK but not XHTML.
>
> You're right, it's because the <br> isn't self closing, correct? Let's file a
> separate bug report for that.
>
will you or i?
> > the problem is then evident with -
> >
> > <div>
> > <span class="Apple-style-span" style="font-weight: bold;"><br class=
> > "khtml-block-placeholder">
> > </span>
> > </div>
> >
> > the whitespace holder now implements bold.
>
> I don't know what you mean, could you rephrase/explain?
>
> > This span is not required here.
>
> You're right that an inline style on the br would be less verbose here, but
> imagine that there were several items inside the span, like:
>
> <span class="Apple-style-span" style="font-weight: bold;">These are my favorite
> sites: <a href="..">drudge report</a> <a href="..">hamster dance</a>.</span>
>
> Now the wrapper span is preferable. It's probably not worth the effort to
> optimize the output for the case you gave.
>
the css style 'font-weight: bold;' has no impact on the br tag. (if i remember
correctly). Therefore this and every other instance where the br tag has
adopted its neighboring styles has questionable validity - it's just extra
code. I understand the cost of trying to optimize - perhaps it's not worth it
here, however optimization of white space management might be simplified if
each paragraph were represented semantically (<p></p>) and just the br tag
present.
> > DIVs should also be replaced by P tags.
>
> Why?
>
Explained above.
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list