rebuild docs
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
91
index.html
91
index.html
@ -414,69 +414,45 @@
|
||||
<div class="snippet">
|
||||
<h3 id="counter"><span>Counter</span><span class="tags__tag snippet__tag" data-type="visual"><i data-feather="eye"></i>visual</span><span class="tags__tag snippet__tag" data-type="other"><i data-feather="tag"></i>other</span></h3>
|
||||
<p>Counters are, in essence, variables maintained by CSS whose values may be incremented by CSS rules to track how many times they're used.</p>
|
||||
<h4 data-type="HTML">HTML</h4><pre><code class="lang-html"><section class="countable-section">
|
||||
<div class="countable-item">
|
||||
<p>Some item</p>
|
||||
<div class="countable-section">
|
||||
<p>First sub item</p>
|
||||
<p>Second sub item</p>
|
||||
<p>Third sub item</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="countable-item">
|
||||
<p>Second other item</p>
|
||||
</div>
|
||||
<div class="countable-item">
|
||||
<p>Third item</p>
|
||||
</div>
|
||||
<div class="countable-item">
|
||||
<p>Fourth item</p>
|
||||
</div>
|
||||
</section>
|
||||
<h4 data-type="HTML">HTML</h4><pre><code class="lang-html"><ul>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
</ul>
|
||||
</code></pre>
|
||||
<h4 data-type="CSS">CSS</h4><pre><code class="lang-css">.countable-section {
|
||||
counter-reset: counter1;
|
||||
<h4 data-type="CSS">CSS</h4><pre><code class="lang-css">ul {
|
||||
counter-reset: counter;
|
||||
}
|
||||
.countable-item p {
|
||||
counter-increment: counter1;
|
||||
}
|
||||
.countable-item p:before {
|
||||
content: counters(counter1, '-') ' ';
|
||||
font-weight: bold; /* for better visualization on demo */
|
||||
li::before {
|
||||
counter-increment: counter;
|
||||
content: counters(counter, '.') ' ';
|
||||
}
|
||||
</code></pre>
|
||||
<h4>Demo</h4>
|
||||
<div class="snippet-demo">
|
||||
<section class="snippet-demo__countable-section">
|
||||
<div class="snippet-demo__countable-item">
|
||||
<p>Some item</p>
|
||||
<div class="snippet-demo__countable-section">
|
||||
<p>First sub item</p>
|
||||
<p>Second sub item</p>
|
||||
<p>Third sub item</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="snippet-demo__countable-item">
|
||||
<p>Second other item</p>
|
||||
</div>
|
||||
<div class="snippet-demo__countable-item">
|
||||
<p>Third item</p>
|
||||
</div>
|
||||
<div class="snippet-demo__countable-item">
|
||||
<p>Fourth item</p>
|
||||
</div>
|
||||
</section>
|
||||
<div class="snippet-demo__countable-section">
|
||||
<ul>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
<li>
|
||||
List item
|
||||
<ul>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.snippet-demo__countable-section {
|
||||
counter-reset: counter1;
|
||||
.snippet-demo__countable-section ul {
|
||||
counter-reset: counter;
|
||||
list-style-type: none;
|
||||
}
|
||||
.snippet-demo__countable-item p {
|
||||
counter-increment: counter1;
|
||||
}
|
||||
.snippet-demo__countable-item p:before {
|
||||
content: counters(counter1, '.') ' ';
|
||||
font-weight: bold;
|
||||
.snippet-demo__countable-section li::before {
|
||||
counter-increment: counter;
|
||||
content: counters(counter, '.') ' ';
|
||||
}
|
||||
</style>
|
||||
<h4>Explanation</h4>
|
||||
@ -489,12 +465,11 @@
|
||||
<p><code>counter-increment</code> Used in element that will be countable. Once <code>counter-reset</code> initialized, a counter's value can be increased or decreased.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>counter(variable_name, style)</code> Displays the value of a section counter. Generally used in a <code>content</code> property. This function can recieve two parameters, the first as the name of the counter and the second one can
|
||||
be <code>decimal</code> or <code>upper-roman</code> (<code>decimal</code> by default).</p>
|
||||
<p><code>counter(name, style)</code> Displays the value of a section counter. Generally used in a <code>content</code> property. This function can recieve two parameters, the first as the name of the counter and the second one can be <code>decimal</code> or <code>upper-roman</code> (<code>decimal</code> by default).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>counters(variable_name, separator, style)</code> Displays the value of a section counter. Generally used in a <code>content</code> property. This function can recieve three parameters, the first as the name of the counter, the second
|
||||
one you can include a string which comes after the counter and the third one can be <code>decimal</code> or <code>upper-roman</code> (<code>decimal</code> by default).</p>
|
||||
<p><code>counters(counter, string, style)</code> Displays the value of a section counter. Generally used in a <code>content</code> property. This function can recieve three parameters, the first as the name of the counter, the second one
|
||||
you can include a string which comes after the counter and the third one can be <code>decimal</code> or <code>upper-roman</code> (<code>decimal</code> by default).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>A CSS counter can be especially useful for making outlined lists, because a new instance of the counter is automatically created in child elements. Using the <code>counters()</code> function, separating text can be inserted between different
|
||||
|
||||
Reference in New Issue
Block a user