<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      If you change the CSS from <br>
      <br>
      <pre wrap="">chapter > title:before {
   counter-reset: figure sect1_count;
}</pre>
      to<br>
      <br>
      <pre wrap="">chapter {
   counter-reset: figure sect1_count;
}</pre>
      <br>
      The difference between Author and Web Author is the handling of
      pseudo-elements. In Author :before is considered sibling with the
      element while in Web Author it is a child. This stackoverflow
      answer [1] helped me troubleshooting this problem, more precisely,
      these quotes from the CSS specification:<br>
      <br>
      <span style="color: rgb(36, 39, 41); font-family: Arial,
        "Helvetica Neue", Helvetica, sans-serif; font-size:
        15px; font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; font-weight: 400; letter-spacing:
        normal; orphans: 2; text-align: left; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 248, 220); text-decoration-style:
        initial; text-decoration-color: initial; display: inline
        !important; float: none;">The scope of a counter starts at the
        first element in the document that has a 'counter-reset' for
        that counter and includes the element's descendants and its
        following siblings with their descendants.<br>
      </span><br>
      <span style="color: rgb(36, 39, 41); font-family: Arial,
        "Helvetica Neue", Helvetica, sans-serif; font-size:
        15px; font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; font-weight: 400; letter-spacing:
        normal; orphans: 2; text-align: left; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 248, 220); text-decoration-style:
        initial; text-decoration-color: initial; display: inline
        !important; float: none;"><span style="color: rgb(36, 39, 41);
          font-family: Arial, "Helvetica Neue", Helvetica,
          sans-serif; font-size: 15px; font-style: normal;
          font-variant-ligatures: normal; font-variant-caps: normal;
          font-weight: 400; letter-spacing: normal; orphans: 2;
          text-align: left; text-indent: 0px; text-transform: none;
          white-space: normal; widows: 2; word-spacing: 0px;
          -webkit-text-stroke-width: 0px; background-color: rgb(255,
          248, 220); text-decoration-style: initial;
          text-decoration-color: initial; display: inline !important;
          float: none;">If 'counter-increment' or 'content' on an
          element or pseudo-element refers to a counter that is not in
          the scope of any 'counter-reset', implementations should
          behave as though a 'counter-reset' had reset the counter to 0
          on that element or pseudo-element.</span></span><br>
      <br>
      Best,<br>
      Cristian<br>
      <br>
      [1] <a class="moz-txt-link-freetext"
        href="https://stackoverflow.com/a/20839693">https://stackoverflow.com/a/20839693</a><br>
      <br>
      On 10/4/2018 12:35 PM, Jirka Kosek wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:309ae816-f049-0cd3-1ea8-2f5edadcb045@kosek.cz">
      <pre wrap="">Hi,

I'm creating customized CSS stylesheet for DocBook based vocabulary. In
Author I need to prepend Figure X.Y label before each figure title.
Where X is chapter number and Y is number of figure inside chapter.
I'm doing this by providing additional styleheet in framework that is
extending DocBook framework:

figure > title:before {
  content: "Figure " counter(chapter_count) "." counter(figure) " ";
}

figure {
  counter-increment: figure;
}

chapter > title:before {
   counter-reset: figure sect1_count;
}

This works as expected in desktop Author. However in Web Author figure
number is being reset for each section, so for example for document like

<chapter>
  ...
  <section>
    ...
    <figure>  <!-- 1.1 -->
    ...
  </section>
  <section>
    ...
    <figure>  <!-- 1.2 -->
    ...
  </section>
</chapter>

Web Author labels both figures as 1.1.

I have briefly looked into HTML/CSS code of Web Author and it seems that
you are somehow preprocessing Author CSS stylesheet for browser and this
particular case is not handled properly.

I suppose there is no easy workaround for this, but perhaps next version
of Web Author could fix this ;-)

Many thanks and have a nice day,

                                Jirka

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext" href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>