diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
commit | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch) | |
tree | d4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/ca/web/css/_colon_root | |
parent | 33058f2b292b3a581333bdfb21b8f671898c5060 (diff) | |
download | translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2 translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip |
initial commit
Diffstat (limited to 'files/ca/web/css/_colon_root')
-rw-r--r-- | files/ca/web/css/_colon_root/index.html | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/files/ca/web/css/_colon_root/index.html b/files/ca/web/css/_colon_root/index.html new file mode 100644 index 0000000000..072802e541 --- /dev/null +++ b/files/ca/web/css/_colon_root/index.html @@ -0,0 +1,112 @@ +--- +title: ':root' +slug: 'Web/CSS/:root' +tags: + - CSS + - Layout + - NeedsMobileBrowserCompatibility + - Pseudo-class + - Reference + - Web +translation_of: 'Web/CSS/:root' +--- +<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>:root</code></strong> coincideix amb l'element arrel de l'arbre que representa el document. En HTML, <code>:root</code> representa l'element {{HTMLElement("html")}} i és idèntic al selector <code>html</code>, excepte que la seva <a href="/en-US/docs/Web/CSS/specificity">Especificitat</a> és més alta.</p> + +<pre class="brush: css no-line-numbers">/* <span id="result_box" lang="ca"><span>Selecciona l'element arrel del document: <html> en el cas de l'HTML</span></span> */ +:root { + background: yellow; +}</pre> + +<h2 id="Sintaxi">Sintaxi</h2> + +<pre class="syntaxbox">{{csssyntax}}</pre> + +<h2 id="Exemple">Exemple</h2> + +<p>El ùs de <code>:root</code> pot ser útil per declarar <a href="/en-US/docs/Web/CSS/Using_CSS_variables">Variables CSS</a> globals:</p> + +<pre class="brush: css">:root { + --main-color: hotpink; + --pane-padding: 5px 42px; +} +</pre> + +<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('CSS4 Selectors', '#root-pseudo', ':root')}}</td> + <td>{{Spec2('CSS4 Selectors')}}</td> + <td>Sense canvis.</td> + </tr> + <tr> + <td>{{SpecName('CSS3 Selectors', '#root-pseudo', ':root')}}</td> + <td>{{Spec2('CSS3 Selectors')}}</td> + <td>Definició inicial.</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>1</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatGeckoDesktop("1.7")}}</td> + <td>9</td> + <td>9.5</td> + <td>1.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>{{CompatUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> |