aboutsummaryrefslogtreecommitdiff
path: root/files/pl/web/api/cssnumericvalue
diff options
context:
space:
mode:
Diffstat (limited to 'files/pl/web/api/cssnumericvalue')
-rw-r--r--files/pl/web/api/cssnumericvalue/div/index.html59
-rw-r--r--files/pl/web/api/cssnumericvalue/index.html113
2 files changed, 172 insertions, 0 deletions
diff --git a/files/pl/web/api/cssnumericvalue/div/index.html b/files/pl/web/api/cssnumericvalue/div/index.html
new file mode 100644
index 0000000000..cd74042e3e
--- /dev/null
+++ b/files/pl/web/api/cssnumericvalue/div/index.html
@@ -0,0 +1,59 @@
+---
+title: CSSNumericValue.div()
+slug: Web/API/CSSNumericValue/div
+translation_of: Web/API/CSSNumericValue/div
+---
+<div>{{draft}}{{APIRef("CSS Typed OM")}}{{SeeCompatTable}}</div>
+
+<p class="summary">The <strong><code>div()</code></strong> method of the {{domxref("CSSNumericValue")}} interface divides the <code>CSSNumericValue</code> by the supplied value.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">var cssNumericValue = CSSNumericValue.div(<em>number</em>);</pre>
+
+<h3 id="Parameters">Parameters</h3>
+
+<dl>
+ <dt>number</dt>
+ <dd>Either a {{jsxref('Number')}} or a {{domxref('CSSNumericValue')}}.</dd>
+</dl>
+
+<h3 id="Return_value">Return value</h3>
+
+<p>A {{domxref('CSSMathProduct')}}.</p>
+
+<h3 id="Exceptions">Exceptions</h3>
+
+<dl>
+ <dt>TypeError</dt>
+ <dd>Indicates that an invalid type was passed to the method.</dd>
+</dl>
+
+<h2 id="Examples">Examples</h2>
+
+<pre class="brush: js">let mathProduct = CSS.px("24").div(CSS.percent("4"));
+// Prints "calc(24px / 4%)"
+mathProduct.toString();</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS Typed OM','#dom-cssnumericvalue-div','div')}}</td>
+ <td>{{Spec2('CSS Typed OM')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.CSSNumericValue.div")}}</p>
diff --git a/files/pl/web/api/cssnumericvalue/index.html b/files/pl/web/api/cssnumericvalue/index.html
new file mode 100644
index 0000000000..eace9532a3
--- /dev/null
+++ b/files/pl/web/api/cssnumericvalue/index.html
@@ -0,0 +1,113 @@
+---
+title: CSSNumericValue
+slug: Web/API/CSSNumericValue
+tags:
+ - API
+ - CSS Typed Object Model API
+ - CSSNumericValue
+ - Experimental
+ - Houdini
+ - Interface
+ - NeedsTranslation
+ - Reference
+ - TopicStub
+translation_of: Web/API/CSSNumericValue
+---
+<div>{{draft}}{{APIRef("CSS Typed OM")}}{{SeeCompatTable}}</div>
+
+<p class="summary">The <strong><code>CSSNumericValue</code></strong> interface of the <a href="/docs/Web/API/CSS_Typed_Object_Model_API">CSS Typed Object Model API</a> represents operations that all numeric values can perform.</p>
+
+<h2 id="Interfaces_based_on_CSSNumericValue">Interfaces based on CSSNumericValue</h2>
+
+<p>Below is a list of interfaces based on the CSSNumericValue interface.</p>
+
+<div class="index">
+<ul>
+ <li>{{domxref('CSSMathInvert')}}</li>
+ <li>{{domxref('CSSMathMax')}}</li>
+ <li>{{domxref('CSSMathMin')}}</li>
+ <li>{{domxref('CSSMathNegate')}}</li>
+ <li>{{domxref('CSSMathProduct')}}</li>
+ <li>{{domxref('CSSMathSum')}}</li>
+ <li>{{domxref('CSSMathValue')}}</li>
+ <li>{{domxref('CSSNumericArray')}}</li>
+ <li>{{domxref('CSSPerspective')}}</li>
+ <li>{{domxref('CSSPositionValue')}}</li>
+ <li>{{domxref('CSSRotate')}}</li>
+ <li>{{domxref('CSSSkew')}}</li>
+ <li>{{domxref('CSSSkeyX')}}</li>
+ <li>{{domxref('CSSSkeyW')}}</li>
+ <li>{{domxref('CSSTranslate')}}</li>
+ <li>{{domxref('CSSUnitValue')}}</li>
+</ul>
+</div>
+
+<h2 id="Properties">Properties</h2>
+
+<p>None.</p>
+
+<h3 id="Event_handlers">Event handlers</h3>
+
+<p>No</p>
+
+<h2 id="Methods">Methods</h2>
+
+<dl>
+ <dt>{{domxref('CSSNumericValue.add')}}</dt>
+ <dd>Adds a supplied number to the <code>CSSNumericValue</code>.</dd>
+ <dt>{{domxref('CSSNumericValue.sub')}}</dt>
+ <dd>Subtracts a supplied number from the <code>CSSNumericValue</code>.</dd>
+ <dt>{{domxref('CSSNumericValue.mul')}}</dt>
+ <dd>Multiplies the <code>CSSNumericValue</code> by the supplied value.</dd>
+ <dt>{{domxref('CSSNumericValue.div')}}</dt>
+ <dd>Divides the <code>CSSNumericValue</code> by the supplied value.</dd>
+ <dt>{{domxref('CSSNumericValue.min')}}</dt>
+ <dd>Returns the minimum value passed</dd>
+ <dt>{{domxref('CSSNumericValue.max')}}</dt>
+ <dd>Returns the maximum value passed</dd>
+ <dt>{{domxref('CSSNumericValue.equals')}}</dt>
+ <dd><em>True</em> if all the values are the exact same type and value, in the same order. Otherwise, <em>false.</em></dd>
+ <dt>{{domxref('CSSNumericValue.to')}}</dt>
+ <dd>Converts <code>value</code> into another one with the specified <var>unit.</var></dd>
+ <dt>{{domxref('CSSNumericValue.toSum')}}</dt>
+ <dd>TBD</dd>
+ <dt>{{domxref('CSSNumericValue.type')}}</dt>
+ <dd>TBD</dd>
+ <dt>{{domxref('CSSNumericValue.parse')}}</dt>
+ <dd>Allows a <code class="idl">CSSNumericValue</code> to be constructed directly from a string containing CSS. </dd>
+</dl>
+
+
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS Typed OM','#numeric-value','CSSNumericValue')}}</td>
+ <td>{{Spec2('CSS Typed OM')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.CSSNumericValue")}}</p>
+
+<h2 id="See_Also">See Also</h2>
+
+<ul>
+ <li>{{domxref('CSSImageValue')}}</li>
+ <li>{{domxref('CSSKeywordValue')}}</li>
+ <li>{{domxref('CSSPositionValue')}}</li>
+ <li>{{domxref('CSSTransformValue')}}</li>
+ <li>{{domxref('CSSUnparsedValue')}}</li>
+</ul>