aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/css/_colon_optional/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/ca/web/css/_colon_optional/index.html
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip
initial commit
Diffstat (limited to 'files/ca/web/css/_colon_optional/index.html')
-rw-r--r--files/ca/web/css/_colon_optional/index.html128
1 files changed, 128 insertions, 0 deletions
diff --git a/files/ca/web/css/_colon_optional/index.html b/files/ca/web/css/_colon_optional/index.html
new file mode 100644
index 0000000000..0437cca6c0
--- /dev/null
+++ b/files/ca/web/css/_colon_optional/index.html
@@ -0,0 +1,128 @@
+---
+title: ':optional'
+slug: 'Web/CSS/:optional'
+tags:
+ - CSS
+ - Layout
+ - Pseudo-class
+ - Reference
+ - Web
+translation_of: 'Web/CSS/:optional'
+---
+<div>{{ CSSRef }}</div>
+
+<p>La <a href="/en-US/docs/Web/CSS/Pseudo-classes">pseudo-class </a><a href="/en-US/docs/Web/CSS">CSS</a> <strong><code>:optional</code></strong> representa qualsevol element {{HTMLElement("input")}}, {{HTMLElement("select")}} o {{HTMLElement("textarea")}} que no té l'atribut {{ htmlattrxref("required", "input") }} establert en ell.</p>
+
+<pre class="brush: css no-line-numbers">/* <span class="short_text" id="result_box" lang="ca"><span>Selecciona qualsevol</span></span> &lt;input&gt; opcional */
+input:optional {
+ border: 1px dashed black;
+}</pre>
+
+<p>Aquesta pseudo-class és útil per als camps d'estil que no són obligatoris per enviar en un formulari.</p>
+
+<div class="note">
+<p><strong>Nota:</strong> La pseudo-class {{cssxref(":required")}} selecciona els camps de formulari <em>obligatoris</em>.</p>
+</div>
+
+<h2 id="Sintaxi">Sintaxi</h2>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="Exemples">Exemples</h2>
+
+<p>Veure {{ cssxref(":invalid") }} com exemple.</p>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Especificació</th>
+ <th scope="col">Estat</th>
+ <th scope="col">Comentari</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('HTML WHATWG', '#selector-optional', ':optional') }}</td>
+ <td>{{ Spec2('HTML WHATWG') }}</td>
+ <td>Sense canvis.</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('HTML5 W3C', '#selector-optional', ':optional') }}</td>
+ <td>{{ Spec2('HTML5 W3C') }}</td>
+ <td><span id="result_box" lang="ca"><span>Defineix la semàntica d'HTML i la validació de restriccions.</span></span></td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('CSS4 Selectors', '#opt-pseudos', ':optional') }}</td>
+ <td>{{ Spec2('CSS4 Selectors') }}</td>
+ <td>Sense canvis.</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('CSS3 Basic UI', '#pseudo-required-value', ':optional') }}</td>
+ <td>{{ Spec2('CSS3 Basic UI') }}</td>
+ <td><span id="result_box" lang="ca"><span>Defineix</span> <span>la</span> <span>pseudo</span><span>-</span><span>classe,</span> <span>però no</span> <span>la semàntica</span> <span>associada.</span></span></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Navegadors_compatibles">Navegadors compatibles</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Descripció</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>10.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{ CompatGeckoDesktop("2") }}</td>
+ <td>10</td>
+ <td>10.0</td>
+ <td>5.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Descripció</th>
+ <th>Android</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>4.4</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{ CompatGeckoMobile("2") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>10.0</td>
+ <td>5.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>Altres pseudo-classes relacionades amb la validació: {{ cssxref(":required") }}, {{ cssxref(":invalid") }}, {{ cssxref(":valid") }}</li>
+ <li><a href="/en-US/docs/Learn/HTML/Forms/Form_validation">Validació de dades del formulari</a></li>
+</ul>