From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pl/web/api/cssnumericvalue/div/index.html | 59 +++++++++++++ files/pl/web/api/cssnumericvalue/index.html | 113 ++++++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 files/pl/web/api/cssnumericvalue/div/index.html create mode 100644 files/pl/web/api/cssnumericvalue/index.html (limited to 'files/pl/web/api/cssnumericvalue') 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 +--- +
{{draft}}{{APIRef("CSS Typed OM")}}{{SeeCompatTable}}
+ +

The div() method of the {{domxref("CSSNumericValue")}} interface divides the CSSNumericValue by the supplied value.

+ +

Syntax

+ +
var cssNumericValue = CSSNumericValue.div(number);
+ +

Parameters

+ +
+
number
+
Either a {{jsxref('Number')}} or a {{domxref('CSSNumericValue')}}.
+
+ +

Return value

+ +

A {{domxref('CSSMathProduct')}}.

+ +

Exceptions

+ +
+
TypeError
+
Indicates that an invalid type was passed to the method.
+
+ +

Examples

+ +
let mathProduct = CSS.px("24").div(CSS.percent("4"));
+// Prints "calc(24px / 4%)"
+mathProduct.toString();
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSS Typed OM','#dom-cssnumericvalue-div','div')}}{{Spec2('CSS Typed OM')}}Initial definition.
+ +

Browser compatibility

+ + + +

{{Compat("api.CSSNumericValue.div")}}

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 +--- +
{{draft}}{{APIRef("CSS Typed OM")}}{{SeeCompatTable}}
+ +

The CSSNumericValue interface of the CSS Typed Object Model API represents operations that all numeric values can perform.

+ +

Interfaces based on CSSNumericValue

+ +

Below is a list of interfaces based on the CSSNumericValue interface.

+ +
+ +
+ +

Properties

+ +

None.

+ +

Event handlers

+ +

No

+ +

Methods

+ +
+
{{domxref('CSSNumericValue.add')}}
+
Adds a supplied number to the CSSNumericValue.
+
{{domxref('CSSNumericValue.sub')}}
+
Subtracts a supplied number from the CSSNumericValue.
+
{{domxref('CSSNumericValue.mul')}}
+
Multiplies the CSSNumericValue by the supplied value.
+
{{domxref('CSSNumericValue.div')}}
+
Divides the CSSNumericValue by the supplied value.
+
{{domxref('CSSNumericValue.min')}}
+
Returns the minimum value passed
+
{{domxref('CSSNumericValue.max')}}
+
Returns the maximum value passed
+
{{domxref('CSSNumericValue.equals')}}
+
True if all the values are the exact same type and value, in the same order. Otherwise, false.
+
{{domxref('CSSNumericValue.to')}}
+
Converts value into another one with the specified unit.
+
{{domxref('CSSNumericValue.toSum')}}
+
TBD
+
{{domxref('CSSNumericValue.type')}}
+
TBD
+
{{domxref('CSSNumericValue.parse')}}
+
Allows a CSSNumericValue to be constructed directly from a string containing CSS. 
+
+ + + +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSS Typed OM','#numeric-value','CSSNumericValue')}}{{Spec2('CSS Typed OM')}}Initial definition.
+ +

Browser compatibility

+ + + +

{{Compat("api.CSSNumericValue")}}

+ +

See Also

+ + -- cgit v1.2.3-54-g00ecf