mozilla

Revision 356761 of list-style

  • Revision slug: CSS/list-style
  • Revision title: list-style
  • Revision id: 356761
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{CSSRef}}

Summary

The list-style CSS property is a shorthand property for setting {{cssxref("list-style-type")}}, {{cssxref("list-style-image")}} and {{cssxref("list-style-position")}}.

  • {{Xref_cssinitial}} {{cssinitial("list-style")}}
  • Applies to elements with display: list-item
  • {{Xref_cssinherited}} yes
  • Media {{Xref_cssvisual}}
  • {{Xref_csscomputed}} see individual properties

Syntax

Formal syntax: {{csssyntax("list-style")}}

Values

Accepts one, two or three keywords in any order.

<'list-style-type'>
See {{cssxref("list-style-type")}}
<'list-style-image'>
See {{cssxref("list-style-image")}}
<'list-style-position'>
See {{cssxref("list-style-position")}}

Examples

{{CSSLiveSample("list-style")}}

ul { list-style: circle; }
#foo { list-style: square inside; }

Specifications

Specification Status Comment
{{SpecName('CSS3 Lists', '#list-style', 'list-style')}} {{Spec2('CSS3 Lists')}} No change.
{{SpecName('CSS2.1', 'generate.html#propdef-list-style', 'list-style')}} {{Spec2('CSS2.1')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 {{CompatGeckoDesktop("1")}} 4.0 7.0 1.0
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 1.0 {{CompatGeckoMobile("1")}} 6.0 6.0 1.0

See also

  • {{Cssxref("list-style-type")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}}

Revision Source

<div>
  {{CSSRef}}</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p>The<code> list-style </code>CSS property is a shorthand property for setting {{cssxref("list-style-type")}}, {{cssxref("list-style-image")}} and {{cssxref("list-style-position")}}.</p>
<ul class="cssprop">
  <li><dfn>{{Xref_cssinitial}}</dfn> {{cssinitial("list-style")}}</li>
  <li><dfn>Applies to</dfn> elements with<code> display: list-item</code></li>
  <li><dfn>{{Xref_cssinherited}}</dfn> yes</li>
  <li><dfn>Media</dfn> {{Xref_cssvisual}}</li>
  <li><dfn>{{Xref_csscomputed}}</dfn> see individual properties</li>
</ul>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="syntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("list-style")}}</pre>
<h3 id="Values" name="Values">Values</h3>
<p>Accepts one, two or three keywords in any order.</p>
<dl>
  <dt>
    <code>&lt;'list-style-type'&gt;</code></dt>
  <dd>
    See {{cssxref("list-style-type")}}</dd>
  <dt>
    <code>&lt;'list-style-image'&gt;</code></dt>
  <dd>
    See {{cssxref("list-style-image")}}</dd>
  <dt>
    <code>&lt;'list-style-position'&gt;</code></dt>
  <dd>
    See {{cssxref("list-style-position")}}</dd>
</dl>
<h2 id="Examples" name="Examples">Examples</h2>
<p>{{CSSLiveSample("list-style")}}</p>
<pre>
ul { list-style: circle; }
</pre>
<pre>
#foo { list-style: square inside; }</pre>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{SpecName('CSS3 Lists', '#list-style', 'list-style')}}</td>
      <td>{{Spec2('CSS3 Lists')}}</td>
      <td>No change.</td>
    </tr>
    <tr>
      <td>{{SpecName('CSS2.1', 'generate.html#propdef-list-style', 'list-style')}}</td>
      <td>{{Spec2('CSS2.1')}}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<div>
  {{CompatibilityTable}}</div>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{CompatGeckoDesktop("1")}}</td>
        <td>4.0</td>
        <td>7.0</td>
        <td>1.0</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{CompatGeckoMobile("1")}}</td>
        <td>6.0</td>
        <td>6.0</td>
        <td>1.0</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also" name="See_also">See also</h2>
<ul>
  <li>{{Cssxref("list-style-type")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}}</li>
</ul>
Revert to this revision