[oXygen-user] Differences in CSS counters between Author and Web Author

Jirka Kosek jirka at kosek.cz
Mon Oct 15 12:28:48 CDT 2018


On 5.10.2018 15:56, Cristi Talau wrote:
> If you change the CSS from
> 
> chapter > title:before {
>    counter-reset: figure sect1_count;
> }
> 
> to
> 
> chapter {
>    counter-reset: figure sect1_count;
> }

Hi Cristian,

thanks for hint. Unfortunately this was not sufficient to fix the issue.
I had to use

chapter  {
  counter-reset: figure example sect1_count !important;
}

The reason is that DocBook framework in elements.css contains the
following rule:

chapter:root {
    counter-reset:chapter_count;
}

Selector "chapter:root" is more specific then "chapter" and thus new
rule for chapter defining proper counter scope has been ignored. I'm not
sure why elements.css is using "chapter:root" instead of just "chapter".
If there is no reason for using :root then I think it would be better
not to use it as counter-reset properties are not combined for multiple
counters.

Thanks and have a nice day,

					Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka at kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
     Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20181015/b1e6de17/attachment.sig>


More information about the oXygen-user mailing list