Forum How do I...?

Empty @top-center at start of chapter using named page

shorshe
Hi @all,

I'm trying to have an empty @top-center only at the start of a chapter, which is marked by an h1.
I'm setting the named page at the h1 tag.

As the h1 should not be standing alone on a page I follow the name with "auto". As soon as I insert the "auto" keyword @top-center is no longer empty.

Im setting the string in @top-center like this
@page:right {
    
    @top-center {
        content: string(right);
        font-family: Garamond;
        font-size: 8pt;
        font-variant: small-caps;
        color: #afafaf;
    }
}


Then I use the a named page to delete

@page kap {
    @top-center {
        content: none;
    }
}


this is the css of the h1
h1 {
    font-family: Garamond_Bold;
    font-weight: bolder;
    font-size: 14pt;
    line-height: 16pt;
    padding-bottom: 2em;
    page-break-before: right;
    text-align: center;
    padding-top: 3em;
    string-set: right content();
    page: kap auto;
}


This works fine unless I insert "auto" after "kap".
I have no clue how to solve this at the moment.
mikeday
Currently the "page" property only accepts one value. I would recommend wrapping the chapter in a <div> element and then using @page:first to change the style of the first page in the chapter, eg.
@page chapter:first { ... }

div.chapter {
    page: chapter;
    prince-page-group: start
}