[css-page | css-box model] margin-inside / margin-outside

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[css-page | css-box model] margin-inside / margin-outside

Christin Götz | pagina GmbH
Hei,

I’m working in book industry and my daily business is to set up CSS for paged media. I have come across some shortcomings with the CSS paged media specs recently and want to let you know about this:

To control the "outer" margin for an element on a page (depending on whether the element is rendered on a right or left page), it would be great if the "margin" property could be extended by two new properties "margin-inside" and "margin-outside".

Prince XML already implemented this with the following properties:
* http://www.princexml.com/doc/properties/margin-inside/
* http://www.princexml.com/doc/properties/margin-outside/

An implementation of such property would make it easier to set up a paged media CSS for different rendering engines. At the moment you need different CSS settings for each render engine to achieve the described formatting.

Kind regards,
Christin

-- 
Christin Götz
Content Engineer

Telefon: (07071) 9876-17
Telefax: (07071) 9876-22
E-Mail: [hidden email]

pagina GmbH - Publikationstechnologien
Herrenberger Straße 51
D-72070 Tübingen
www.pagina-online.de

Handelsregister Stuttgart - HRB 380249
Geschäftsführer: Tobias Ott
Reply | Threaded
Open this post in threaded view
|

[css-page] control space before element depending on page position

Christin Götz | pagina GmbH
Hei,

I’m working in book industry and my daily business is to set up CSS for paged media. I have come across some shortcomings with the CSS paged media specs recently and want to let you know about this:

In the CSS Paged Media Specification I'm missing a property to control the "space before" an element (like a heading) depending on the current rendering position on the page.

For example: in CSS I define a "margin-top" for headings:

    heading {
        margin-top: 2em;
        }

However, the "margin-top" should NOT be applied when the heading is rendered as the first(!) element on the page to assure that there's no additional spacing rendered at the beginning of the text box.

This use case is an important and daily requirement in publishing industry. Thus, it would be great if a CSS property to control the space before an element will be added to the CSS spec in future.

Kind regards,
Christin

-- 
Christin Götz
Content Engineer

Telefon: (07071) 9876-17
Telefax: (07071) 9876-22
E-Mail: [hidden email]

pagina GmbH - Publikationstechnologien
Herrenberger Straße 51
D-72070 Tübingen
www.pagina-online.de

Handelsregister Stuttgart - HRB 380249
Geschäftsführer: Tobias Ott
Reply | Threaded
Open this post in threaded view
|

Re: [css-page | css-box model] margin-inside / margin-outside

Alexander Christiaan Jacob
In reply to this post by Christin Götz | pagina GmbH



----- Original Message -----
From:
"Christin_Götz_|_pagina_GmbH" <[hidden email]>

To:
<[hidden email]>
Cc:
"Tobias Fischer | pagina GmbH" <[hidden email]>
Sent:
Wed, 29 Jun 2016 09:20:22 +0200
Subject:
[css-page | css-box model] margin-inside / margin-outside


Hei,

I’m working in book industry and my daily business is to set up CSS for paged media. I have come across some shortcomings with the CSS paged media specs recently and want to let you know about this:

To control the "outer" margin for an element on a page (depending on whether the element is rendered on a right or left page), it would be great if the "margin" property could be extended by two new properties "margin-inside" and "margin-outside".

Prince XML already implemented this with the following properties:
* http://www.princexml.com/doc/properties/margin-inside/
* http://www.princexml.com/doc/properties/margin-outside/

An implementation of such property would make it easier to set up a paged media CSS for different rendering engines. At the moment you need different CSS settings for each render engine to achieve the described formatting.

Kind regards,
Christin

--
Christin Götz
Content Engineer

Telefon: (07071) 9876-17
Telefax: (07071) 9876-22
E-Mail: [hidden email]

pagina GmbH - Publikationstechnologien
Herrenberger Straße 51
D-72070 Tübingen
www.pagina-online.de

Handelsregister Stuttgart - HRB 380249
Geschäftsführer: Tobias Ott

Hello Christin,


That, to me, sounds like something that can currently be achieved using the Paged Media Module. See https://www.w3.org/TR/css3-page/#spread-pseudos and further.

Hope this helps.


Regards,


Alexander
Reply | Threaded
Open this post in threaded view
|

Re: [css-page] control space before element depending on page position

Sebastian Zartner-3
In reply to this post by Christin Götz | pagina GmbH
On 29 June 2016 at 09:25, Christin Götz | pagina GmbH
<[hidden email]> wrote:

> Hei,
>
> I’m working in book industry and my daily business is to set up CSS for
> paged media. I have come across some shortcomings with the CSS paged media
> specs recently and want to let you know about this:
>
> In the CSS Paged Media Specification I'm missing a property to control the
> "space before" an element (like a heading) depending on the current
> rendering position on the page.
>
> For example: in CSS I define a "margin-top" for headings:
>
>     heading {
>         margin-top: 2em;
>         }
>
> However, the "margin-top" should NOT be applied when the heading is rendered
> as the first(!) element on the page to assure that there's no additional
> spacing rendered at the beginning of the text box.
>
> This use case is an important and daily requirement in publishing industry.
> Thus, it would be great if a CSS property to control the space before an
> element will be added to the CSS spec in future.
>
> Kind regards,
> Christin

Hi Christin! Issues are now tracked on GitHub, so I've created an issue there:
https://github.com/w3c/csswg-drafts/issues/253

Sebastian

Reply | Threaded
Open this post in threaded view
|

Re: [css-page | css-box model] margin-inside / margin-outside

fantasai
In reply to this post by Alexander Christiaan Jacob
On 06/29/2016 08:45 AM, [hidden email] wrote:
>
>
> Hello Christin,
>
>
> That, to me, sounds like something that can currently be achieved using the Paged Media Module.
> See https://www.w3.org/TR/css3-page/#spread-pseudos and further.

Well, that will let you control the page margins differently,
but if you want to control margins of an element within the
page, you're out of luck.

We do plan to add this feature in a future level of CSS Scoping
   https://www.w3.org/TR/2014/WD-css-scoping-1-20140403/#fragment-scoping
using a ::page(<page-selector>) pseudo-element; however it's
not a top priority at the moment.

~fantasai

Reply | Threaded
Open this post in threaded view
|

Re: [css-page | css-box model] margin-inside / margin-outside

Christin Götz | pagina GmbH
Hei fantasai,

Am 30.06.2016 um 00:25 schrieb fantasai:
On 06/29/2016 08:45 AM, [hidden email] wrote:


Hello Christin,


That, to me, sounds like something that can currently be achieved using the Paged Media Module.
See https://www.w3.org/TR/css3-page/#spread-pseudos and further.

Well, that will let you control the page margins differently,
but if you want to control margins of an element within the
page, you're out of luck.


This is what I want! (to control margins of an element within the page)

We do plan to add this feature in a future level of CSS Scoping
  https://www.w3.org/TR/2014/WD-css-scoping-1-20140403/#fragment-scoping
using a ::page(<page-selector>) pseudo-element; however it's
not a top priority at the moment.

This is :/

Ok, I use PrinceXML or AHFormatter as renderer thus I know there are proprietary settings available to achieve the rendering I want.
But proprietary settings aren't a solution in long term view (in my opinion). Thus, it would be great if this issue get a higher priority ...

Christin


P. S. I added the topic to GitHub https://github.com/w3c/csswg-drafts/issues/255