Re: paragraphs
Johannes Hofmann <[email protected]>
| Newsgroups | gmane.comp.web.dillo.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Sep 05, 2012 at 10:43:42PM +0200, Johannes Hofmann wrote:
> On Tue, Sep 04, 2012 at 09:57:59PM +0200, Johannes Hofmann wrote:
> > On Tue, Sep 04, 2012 at 03:22:39PM +0000, corvid wrote:
> > >
> > > IIRC, the space between paragraphs went away when display was
> > > implemented. Do you have an idea of what the problem was in the
> > > code? (I'm so used to it now that I rarely remember that it
> > > isn't supposed to be that way.)
> > >
> >
> > I only know that things changed quite a bit due to paragraphs being
> > textblocks now.
> > I guess we need to make a testcase and compare the rendering to e.g.
> > firefox and then see how to fix problems.
>
> I looked a bit at it and it's probabely just a missing line in the
> user-agent style, e.g:
>
> diff -r 773b79919a0b src/styleengine.cc
> --- a/src/styleengine.ccTue Sep 04 15:09:40 2012 +0000
> +++ b/src/styleengine.ccWed Sep 05 22:42:33 2012 +0200
> @@ -831,6 +831,7 @@
> "i, em, cite, address, var {font-style: italic}"
> ":link img, :visited img {border: 1px solid}"
> "frameset, ul, ol, dir {margin-left: 40px}"
> + "p {margin: 1em 0}"
> "h1 {font-size: 2em; margin-top: .67em; margin-bottom: 0}"
> "h2 {font-size: 1.5em; margin-top: .75em; margin-bottom: 0}"
> "h3 {font-size: 1.17em; margin-top: .83em; margin-bottom: 0}"
>
>
> I'm still researching, why 1em seems to be a bit more in dillo than
> in firefox.
Ok I remember now. Adding "p {margin: 1em 0}" to our user agent
style is correct. However we need to implement collapsing
bottom-margin and top-margins for subsequent block level elements to
make it look nice.