﻿<?xml version="1.0" encoding="utf-8"?>
<!--
CSS Counter Styles Level 3
W3C Last Call Working Draft, 26 August 2014
http://www.w3.org/TR/2014/WD-css-counter-styles-3-20140826/
-->
<definitions xmlns="urn:schemas-jetbrains-com:css-xml">
  <named-value id="counter-style-name" declared-in="3.0"
               url="http://www.w3.org/TR/2014/WD-css-counter-styles-3-20140826/#typedef-counter-style-name">
    <group type="or">
      <name/>
      <name value="-moz-arabic-indic"/>
      <name value="-moz-bengali"/>
      <name value="-moz-cjk-earthly-branch"/>
      <name value="-moz-cjk-heavenly-stem"/>
      <name value="-moz-devanagari"/>
      <name value="-moz-ethiopic-halehame"/>
      <name value="-moz-ethiopic-halehame-am"/>
      <name value="-moz-ethiopic-halehame-ti-er"/>
      <name value="-moz-ethiopic-halehame-ti-et"/>
      <name value="-moz-ethiopic-numeric"/>
      <name value="-moz-gujarati"/>
      <name value="-moz-gurmukhi"/>
      <name value="-moz-hangul"/>
      <name value="-moz-hangul-consonant"/>
      <name value="-moz-japanese-formal"/>
      <name value="-moz-japanese-informal"/>
      <name value="-moz-kannada"/>
      <name value="-moz-khmer"/>
      <name value="-moz-lao"/>
      <name value="-moz-malayalam"/>
      <name value="-moz-myanmar"/>
      <name value="-moz-oriya"/>
      <name value="-moz-persian"/>
      <name value="-moz-simp-chinese-formal"/>
      <name value="-moz-simp-chinese-informal"/>
      <name value="-moz-tamil"/>
      <name value="-moz-telugu"/>
      <name value="-moz-thai"/>
      <name value="-moz-trad-chinese-formal"/>
      <name value="-moz-trad-chinese-informal"/>
      <name value="-moz-urdu"/>
    </group>
  </named-value>

  <named-value id="symbol" declared-in="3.0" url="http://www.w3.org/TR/2014/WD-css-counter-styles-3-20140826/#typedef-symbol">
    <group type="or">
      <string/>
      <inline id="image"/>
      <name/>
    </group>
  </named-value>

  <named-value id="counter-style" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#extending-css2">
    <group type="or">
      <inline id="counter-style-name"/>
      <invoke id="symbols"/>
    </group>
  </named-value>

  <named-value id="symbol-type" declared-in="3.0" url="http://www.w3.org/TR/2014/WD-css-counter-styles-3-20140826/#typedef-symbols-type">
    <group type="or">
      <name value="cyclic"/>
      <name value="numeric"/>
      <name value="alphabetic"/>
      <name value="symbolic"/>
      <name value="fixed"/>
    </group>
  </named-value>

  <property id="system" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-system"
            applies="@counter-style" initial="symbolic" rules="@counter-style">
    <description><![CDATA[
      <p>The system descriptor specifies which algorithm will be used to construct the counter’s representation based on the counter value.
        For example, cyclic counter styles just cycle through their symbols repeatedly, while numeric counter styles interpret their symbols
        as digits and build their representation accordingly.</p>
      ]]></description>
    <group type="or">
      <name value="cyclic"
            tooltip="The cyclic counter system cycles repeatedly through its provided symbols, looping back to the beginning when it reaches the end of the list. It can be used for simple bullets (just provide a single counter symbol), or for cycling through multiple symbols. The first counter symbol is used as the representation of the value 1, the second counter symbol (if it exists) is used as the representation of the value 2, etc."/>
      <name value="numeric"
            tooltip="The numeric counter system interprets the list of counter symbols as digits to a 'place-value' numbering system, similar to the default decimal counter style. The first counter symbol in the list is interpreted as the digit 0, the second as the digit 1, and so on."/>
      <name value="alphabetic"
            tooltip='The alphabetic counter system interprets the list of counter symbols as digits to an alphabetic numbering system, similar to the default lower-alpha counter style, which wraps from "a", "b", "c", to "aa", "ab", "ac".'/>
      <name value="symbolic"
            tooltip="The symbolic counter system cycles repeatedly through its provided symbols, doubling, tripling, etc. the symbols on each successive pass through the list."/>
      <name value="additive"
            tooltip="The additive counter system is used to represent 'sign-value' numbering systems, which, rather than using reusing digits in different positions to change their value, define additional digits with much larger values, so that the value of the number can be obtained by adding all the digits together. This is used in Roman numerals and other numbering systems around the world."/>
      <group>
        <name value="fixed"
              tooltip="The fixed counter system runs through its list of counter symbols once, then falls back. It is useful for representing counter styles that only have a finite number of representations. For example, Unicode defines several limited-length runs of special characters meant for lists, such as circled digits."/>
        <integer min="0"/>
      </group>
      <group>
        <name value="extends"
              tooltip="The extends system allows an author to use the algorithm of another counter style, but alter other aspects, such as the negative sign or the suffix. If a counter style uses the extends system, any unspecified descriptors must be taken from the extended counter style specified, rather than taking their initial values."/>
        <inline id="counter-style-name"
                tooltip="The counter’s value is instead spoken out in the specified style (similar to the behavior of the fallback descriptor when generating representations for a counter value). If the specified style does not exist, this value is treated as auto. If a loop is detected when following speak-as references, this value is treated as auto for the counter styles participating in the loop."/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="negative" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-negative"
            applies="@counter-style"
            initial='"-"' rules="@counter-style">
    <description><![CDATA[
      <p>The first &lt;symbol&gt; in the value is prepended to the representation when the counter value is negative. The second &lt;symbol&gt;,
        if specified, is appended to the representation when the counter value is negative.</p>
      ]]></description>
    <group type="or">
      <group>
        <inline id="symbol"/>
        <inline id="symbol" min="0"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="prefix" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-prefix"
            applies="@counter-style"
            initial='""' rules="@counter-style">
    <description><![CDATA[
      <p>The prefix descriptor specifies a
        &lt;symbol&gt; that is prepended to the marker representation. Prefixes are only added by the algorithm for constructing the default
        contents of the :<see cref="PE:marker"/> pseudo-element; the prefix is not added automatically when the counter() or counters()
        functions are
        used. Prefixes come before any negative sign.</p>
      ]]></description>
    <group type="or">
      <inline id="symbol"/>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="suffix" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-suffix"
            applies="@counter-style" initial='"\2E\20"' rules="@counter-style">
    <description><![CDATA[
      <p>The suffix descriptor specifies a
        &lt;symbol&gt; that is appended to the marker representation. Suffixes are only added by the algorithm for constructing the default
        contents of the ::marker pseudo-element; the suffix is not added automatically when the <see cref="F:counter"/>() or <see
            cref="F:counters"/>() functions are used. Suffixes are added to the representation after negative signs.
      </p>
      ]]></description>
    <group type="or">
      <inline id="symbol"/>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="range" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-range"
            applies="@counter-style"
            initial="auto" rules="@counter-style">
    <description><![CDATA[
      <p>The range descriptor defines the ranges over which the counter style is defined. If a counter style is used to represent a counter
        value outside of its ranges, the counter style instead drops down to its fallback counter style.</p>
      ]]></description>
    <group type="or">
      <group comma-separated="yes">
        <group type="or" min="2">
          <integer/>
          <name value="infinite"/>
        </group>
      </group>
      <name value="auto"/>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="pad" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-pad" applies="@counter-style"
            initial='0 ""' rules="@counter-style">
    <group type="or">
      <group type="and">
        <integer
            tooltip="The &lt;integer&gt; specifies a minimum length that all counter representations must reach. Let difference be the provided &lt;integer&gt; minus the number of grapheme clusters in the initial representation for the counter value. (Note that, per the algorithm to generate a counter representation, this occurs before adding prefixes/suffixes/negatives.) If the counter value is negative and the counter style uses a negative sign, further reduce difference by the number of grapheme clusters in the counter style’s negative descriptor’s &lt;symbol&gt;(s). If difference is greater than zero, prepend difference copies of the specified &lt;symbol&gt; to the representation. The &lt;integer&gt; must be non-negative. A negative value is a syntax error."/>
        <inline id="symbol"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="fallback" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-fallback"
            applies="@counter-style"
            initial="decimal" rules="@counter-style">
    <description><![CDATA[
      <p>If the value of the fallback descriptor isn’t the name of any currently-defined counter style, the used value of the fallback
        descriptor is decimal instead. Similarly, while following fallbacks to find a counter style that can render the given counter value,
        if
        a loop in the specified fallbacks is detected, the decimal style must be used instead.</p>
      ]]></description>
    <group type="or">
      <inline id="counter-style-name"/>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="symbols" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-symbols"
            applies="@counter-style"
            initial="n/a" rules="@counter-style">
    <group type="or">
      <inline id="symbol" max="-1"/>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="additive-symbols" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-additive-symbols"
            applies="@counter-style" initial="n/a" rules="@counter-style">
    <description><![CDATA[
      <p>The <see cref="P:symbols"/> and additive-symbols descriptors specify the symbols used by the marker-construction algorithm
        specified by
        the <see cref="P:system"/> descriptor. The
        <see cref="P:symbols"/> descriptor must be specified if the counter system is cyclic, numeric, alphabetic, symbolic, or fixed, and
        the additive-symbols descriptor must be specified if the counter system is additive; otherwise, the @counter-style is invalid and
        must
        be ignored.</p>
      ]]></description>
    <group type="or">
      <group type="and" comma-separated="yes">
        <integer/>
        <inline id="symbol"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="speak-as" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#descdef-counter-style-speak-as"
            applies="@counter-style"
            initial="auto" rules="@counter-style">
    <description><![CDATA[
      <p>The speak-as descriptor describes how to synthesize the spoken form of a counter formatted with the given counter style.</p>
      ]]></description>
    <group type="or">
      <name value="auto"
            tooltip="If the counter style’s system is alphabetic, this value has the same effect as spell-out. If the system is cyclic, this value has the same effect as bullets. If the system is extends, this value has the same effect as auto would have for the extended style. Otherwise, this value has the same effect as numbers."/>
      <name value="bullets"
            tooltip="The UA speaks a UA-defined phrase or audio cue that represents an unordered list item being read out."/>
      <name value="numbers" tooltip="The counter’s value is spoken as a number in the document language."/>
      <name value="words"
            tooltip="Generate a counter representation for the value as normal, then speak it as normal text in the document language."/>
      <name value="spell-out"
            tooltip="Generate a counter representation for the value as normal, then spell it out letter-by-letter in the document language. If the UA does not know how to pronounce the symbols, it may handle it as numbers. For example, lower-greek in English would be read out as &quot;alpha&quot;, &quot;beta&quot;, &quot;gamma&quot;, etc. Conversely, upper-latin in French would be read out as (in phonetic notation) /a/, /be/, /se/, etc."/>
      <inline id="counter-style-name"
              tooltip="The counter’s value is instead spoken out in the specified style (similar to the behavior of the fallback descriptor when generating representations for a counter value). If the specified style does not exist, this value is treated as auto. If a loop is detected when following speak-as references, this value is treated as auto for the counter styles participating in the loop."/>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <function id="symbols" declared-in="3.0" url="http://www.w3.org/TR/css-counter-styles-3/#symbols">
    <description><![CDATA[
      <p>The symbols() function allows a counter style to be defined inline in a property value, for when a style is used only once in a
        stylesheet and defining a full @counter-style rule would be overkill. It does not provide the full feature-set of the @counter-style
        rule, but provides a sufficient subset to still be useful.</p>
      ]]></description>
    <group>
      <inline id="symbol-type" min="0"/>
      <group type="or" max="-1">
        <string/>
        <inline id="image"/>
      </group>
    </group>
  </function>

</definitions>
