Skip to content

Commit a820ff3

Browse files
teoli2003Elchi3
andauthored
Improve no spec msgs for CSSValue, CSSPrimitiveValue, CSSValueList (mdn#6134)
* Improove no spec messages for CSSValue, CSSPrimitiveValue, CSSValueList and children * Fix typo Co-authored-by: Florian Scholz <fs@florianscholz.com>
1 parent 1ec9f9a commit a820ff3

File tree

17 files changed

+242
-32
lines changed

17 files changed

+242
-32
lines changed

files/en-us/web/api/css_object_model/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<p>{{DefaultAPISidebar("CSSOM")}}</p>
1111

1212
<p class="summary">The <strong>CSS Object Model</strong> is a set of APIs allowing the manipulation of CSS from JavaScript. It is much like the DOM, but for the CSS rather than the HTML. It allows users to read and modify CSS style dynamically.</p>
13+
<p>The values of CSS are represented untyped, that is using {{JSxRef("String")}} objects.</p>
1314

1415
<h2 id="Reference">Reference</h2>
1516

files/en-us/web/api/cssprimitivevalue/getcountervalue/index.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- Deprecated
1111
browser-compat: api.CSSPrimitiveValue.getCounterValue
1212
---
13-
<div>{{APIRef("DOM")}}{{deprecated_header}}</div>
13+
<div>{{APIRef("CSSOM")}}{{deprecated_header}}</div>
1414

1515
<p>The <code><strong>getCounterValue()</strong></code> method of the
1616
{{domxref("CSSPrimitiveValue")}} interface is used to get the <a
@@ -19,6 +19,16 @@
1919
is raised. Modification to the corresponding style property can be achieved using the
2020
{{domxref("Counter")}} interface.</p>
2121

22+
<div class="notecard note">
23+
<p><strong>Note:</strong> This method was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do
24+
not implement it.</p>
25+
<p>To achieve your purpose, you can use:</p>
26+
<ul>
27+
<li>the untyped <a href="/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a>, widely supported, or</li>
28+
<li>the modern <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a>, less supported and considered experimental.</li>
29+
</ul>
30+
</div>
31+
2232
<h2 id="Syntax">Syntax</h2>
2333

2434
<pre
@@ -48,7 +58,10 @@ <h3 id="Exceptions">Exceptions</h3>
4858

4959
<h2 id="Specifications">Specifications</h2>
5060

51-
{{Specifications}}
61+
<p>This feature was originally defined in the <a href="https://www.w3.org/TR/DOM-Level-2-Style">DOM Style Level 2</a> specification, but has been dropped from any
62+
standardization effort since then.</p>
63+
64+
<p>It has been superseded by a modern, but incompatible, <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a> that is now on the standard track.</p>
5265

5366
<h2 id="Browser_compatibility">Browser compatibility</h2>
5467

files/en-us/web/api/cssprimitivevalue/getfloatvalue/index.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,23 @@
99
- Deprecated
1010
browser-compat: api.CSSPrimitiveValue.getFloatValue
1111
---
12-
<div>{{APIRef("DOM")}}{{deprecated_header}}</div>
12+
<div>{{APIRef("CSSOM")}}{{deprecated_header}}</div>
1313

1414
<p>The <code><strong>getFloatValue()</strong></code> method of the
1515
{{domxref("CSSPrimitiveValue")}} interface is used to get a float value in a specified
1616
unit. If this CSS value doesn't contain a float value or can't be converted into the
1717
specified unit, a {{domxref("DOMException")}} is raised.</p>
1818

19+
<div class="notecard note">
20+
<p><strong>Note:</strong> This method was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do
21+
not implement it.</p>
22+
<p>To achieve your purpose, you can use:</p>
23+
<ul>
24+
<li>the untyped <a href="/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a>, widely supported, or</li>
25+
<li>the modern <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a>, less supported and considered experimental.</li>
26+
</ul>
27+
</div>
28+
1929
<h2 id="Syntax">Syntax</h2>
2030

2131
<pre
@@ -141,7 +151,10 @@ <h2 id="Example">Example</h2>
141151

142152
<h2 id="Specifications">Specifications</h2>
143153

144-
{{Specifications}}
154+
<p>This feature was originally defined in the <a href="https://www.w3.org/TR/DOM-Level-2-Style">DOM Style Level 2</a> specification, but has been dropped from any
155+
standardization effort since then.</p>
156+
157+
<p>It has been superseded by a modern, but incompatible, <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a> that is now on the standard track.</p>
145158

146159
<h2 id="Browser_compatibility">Browser compatibility</h2>
147160

files/en-us/web/api/cssprimitivevalue/getrectvalue/index.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,24 @@
99
- Deprecated
1010
browser-compat: api.CSSPrimitiveValue.getRectValue
1111
---
12-
<div>{{APIRef("DOM")}}{{deprecated_header}}</div>
12+
<div>{{APIRef("CSSOM")}}{{deprecated_header}}</div>
1313

1414
<p>The <code><strong>getRectValue()</strong></code> method of the
1515
{{domxref("CSSPrimitiveValue")}} interface is used to get a rect value. If this CSS
1616
value doesn't contain a rect value, a {{domxref("DOMException")}} is raised.
1717
Modification to the corresponding style property can be achieved using the
1818
{{domxref("Rect")}} interface.</p>
1919

20+
<div class="notecard note">
21+
<p><strong>Note:</strong> This method was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do
22+
not implement it.</p>
23+
<p>To achieve your purpose, you can use:</p>
24+
<ul>
25+
<li>the untyped <a href="/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a>, widely supported, or</li>
26+
<li>the modern <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a>, less supported and considered experimental.</li>
27+
</ul>
28+
</div>
29+
2030
<h2 id="Syntax">Syntax</h2>
2131

2232
<pre
@@ -52,7 +62,10 @@ <h2 id="Example">Example</h2>
5262

5363
<h2 id="Specifications">Specifications</h2>
5464

55-
{{Specifications}}
65+
<p>This feature was originally defined in the <a href="https://www.w3.org/TR/DOM-Level-2-Style">DOM Style Level 2</a> specification, but has been dropped from any
66+
standardization effort since then.</p>
67+
68+
<p>It has been superseded by a modern, but incompatible, <a href="CSS_Typed_OM_API">CSS Typed Object Model API</a> that is now on the standard track.</p>
5669

5770
<h2 id="Browser_compatibility">Browser compatibility</h2>
5871

files/en-us/web/api/cssprimitivevalue/getrgbcolorvalue/index.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,24 @@
99
- Deprecated
1010
browser-compat: api.CSSPrimitiveValue.getRGBColorValue
1111
---
12-
<div>{{APIRef("DOM")}}{{deprecated_header}}</div>
12+
<div>{{APIRef("CSSOM")}}{{deprecated_header}}</div>
1313

1414
<p>The <code><strong>getRGBColorValue()</strong></code> method of the
1515
{{domxref("CSSPrimitiveValue")}} interface is used to get an RGB color value. If this
1616
CSS value doesn't contain a RGB color value, a {{domxref("DOMException")}} is raised.
1717
Modification to the corresponding style property can be achieved using the
1818
{{domxref("RGBColor")}} interface.</p>
1919

20+
<div class="notecard note">
21+
<p><strong>Note:</strong> This method was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do
22+
not implement it.</p>
23+
<p>To achieve your purpose, you can use:</p>
24+
<ul>
25+
<li>the untyped <a href="/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a>, widely supported, or</li>
26+
<li>the modern <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a>, less supported and considered experimental.</li>
27+
</ul>
28+
</div>
29+
2030
<h2 id="Syntax">Syntax</h2>
2131

2232
<pre
@@ -52,7 +62,10 @@ <h2 id="Example">Example</h2>
5262

5363
<h2 id="Specifications">Specifications</h2>
5464

55-
{{Specifications}}
65+
<p>This feature was originally defined in the <a href="https://www.w3.org/TR/DOM-Level-2-Style">DOM Style Level 2</a> specification, but has been dropped from any
66+
standardization effort since then.</p>
67+
68+
<p>It has been superseded by a modern, but incompatible, <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a> that is now on the standard track.</p>
5669

5770
<h2 id="Browser_compatibility">Browser compatibility</h2>
5871

files/en-us/web/api/cssprimitivevalue/getstringvalue/index.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,22 @@
99
- Deprecated
1010
browser-compat: api.CSSPrimitiveValue.getStringValue
1111
---
12-
<div>{{APIRef("DOM")}}{{deprecated_header}}</div>
12+
<div>{{APIRef("CSSOM")}}{{deprecated_header}}</div>
1313

1414
<p>The <code><strong>getStringValue()</strong></code> method of the
1515
{{domxref("CSSPrimitiveValue")}} interface is used to get a string value. If this CSS
1616
value doesn't contain a string value, a {{domxref("DOMException")}} is raised.</p>
1717

18+
<div class="notecard note">
19+
<p><strong>Note:</strong> This method was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do
20+
not implement it.</p>
21+
<p>To achieve your purpose, you can use:</p>
22+
<ul>
23+
<li>the untyped <a href="/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a>, widely supported, or</li>
24+
<li>the modern <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a>, less supported and considered experimental.</li>
25+
</ul>
26+
</div>
27+
1828
<h2 id="Syntax">Syntax</h2>
1929

2030
<pre
@@ -50,7 +60,10 @@ <h2 id="Example">Example</h2>
5060

5161
<h2 id="Specifications">Specifications</h2>
5262

53-
{{Specifications}}
63+
<p>This feature was originally defined in the <a href="https://www.w3.org/TR/DOM-Level-2-Style">DOM Style Level 2</a> specification, but has been dropped from any
64+
standardization effort since then.</p>
65+
66+
<p>It has been superseded by a modern, but incompatible, <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a> that is now on the standard track.</p>
5467

5568
<h2 id="Browser_compatibility">Browser compatibility</h2>
5669

files/en-us/web/api/cssprimitivevalue/index.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414

1515
<p>The <code><strong>CSSPrimitiveValue</strong></code> interface derives from the {{DOMxRef("CSSValue")}} interface and represents the current computed value of a CSS property.</p>
1616

17+
<div class="notecard note">
18+
<p><strong>Note:</strong> This interface was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do
19+
not implement it.</p>
20+
<p>To achieve your purpose, you can use:</p>
21+
<ul>
22+
<li>the untyped <a href="/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a>, widely supported, or</li>
23+
<li>the modern <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a>, less supported and considered experimental.</li>
24+
</ul>
25+
</div>
26+
1727
<p>This interface represents a single CSS value. It may be used to determine the value of a specific style property currently set in a block or to set a specific style property explicitly within the block. An instance of this interface might be obtained from the {{DOMxRef("CSSStyleDeclaration.getPropertyCSSValue()", "getPropertyCSSValue()")}} method of the {{DOMxRef("CSSStyleDeclaration")}} interface. A <code>CSSPrimitiveValue</code> object only occurs in a context of a CSS property.</p>
1828

1929
<p>Conversions are allowed between absolute values (from millimeters to centimeters, from degrees to radians, and so on) but not between relative values. (For example, a pixel value cannot be converted to a centimeter value.) Percentage values can't be converted since they are relative to the parent value (or another property value). There is one exception for color percentage values: since a color percentage value is relative to the range 0-255, a color percentage value can be converted to a number (see also the {{DOMxRef("RGBColor")}} interface).</p>
@@ -163,7 +173,10 @@ <h2 id="Methods">Methods</h2>
163173

164174
<h2 id="Specifications">Specifications</h2>
165175

166-
{{Specifications}}
176+
<p>This feature was originally defined in the <a href="https://www.w3.org/TR/DOM-Level-2-Style">DOM Style Level 2</a> specification, but has been dropped from any
177+
standardization effort since then.</p>
178+
179+
<p>It has been superseded by a modern, but incompatible, <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a> that is now on the standard track.</p>
167180

168181
<h2 id="Browser_compatibility">Browser compatibility</h2>
169182

files/en-us/web/api/cssprimitivevalue/primitivetype/index.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,21 @@
1010
- primitiveValue
1111
browser-compat: api.CSSPrimitiveValue.primitiveType
1212
---
13-
<div>{{APIRef("DOM")}}</div>
13+
<div>{{APIRef("CSSOM")}}</div>
1414

1515
<p>The <code><strong>primitiveType</strong></code> read-only property of the
1616
{{domxref("CSSPrimitiveValue")}} interface represents the type of a CSS value.</p>
1717

18+
<div class="notecard note">
19+
<p><strong>Note:</strong> This property was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do
20+
not implement it.</p>
21+
<p>To achieve your purpose, you can use:</p>
22+
<ul>
23+
<li>the untyped <a href="/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a>, widely supported, or</li>
24+
<li>the modern <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a>, less supported and considered experimental.</li>
25+
</ul>
26+
</div>
27+
1828
<h2 id="Syntax">Syntax</h2>
1929

2030
<pre class="brush: js"><var>type</var> = <var>cssPrimitiveValue</var>.primitiveType;
@@ -175,7 +185,10 @@ <h2 id="Example">Example</h2>
175185

176186
<h2 id="Specifications">Specifications</h2>
177187

178-
{{Specifications}}
188+
<p>This feature was originally defined in the <a href="https://www.w3.org/TR/DOM-Level-2-Style">DOM Style Level 2</a> specification, but has been dropped from any
189+
standardization effort since then.</p>
190+
191+
<p>It has been superseded by a modern, but incompatible, <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a> that is now on the standard track.</p>
179192

180193
<h2 id="Browser_compatibility">Browser compatibility</h2>
181194

files/en-us/web/api/cssprimitivevalue/setfloatvalue/index.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,23 @@
1010
- Deprecated
1111
browser-compat: api.CSSPrimitiveValue.setFloatValue
1212
---
13-
<div>{{APIRef("DOM")}}{{deprecated_header}}</div>
13+
<div>{{APIRef("CSSOM")}}{{deprecated_header}}</div>
1414

1515
<p>The <code><strong>setFloatValue()</strong></code> method of the
1616
{{domxref("CSSPrimitiveValue")}} interface is used to set a float value. If the property
1717
attached to this value can't accept the specified unit or the float value, the value
1818
will be unchanged and a {{domxref("DOMException")}} will be raised.</p>
1919

20+
<div class="notecard note">
21+
<p><strong>Note:</strong> This method was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do
22+
not implement it.</p>
23+
<p>To achieve your purpose, you can use:</p>
24+
<ul>
25+
<li>the untyped <a href="/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a>, widely supported, or</li>
26+
<li>the modern <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a>, less supported and considered experimental.</li>
27+
</ul>
28+
</div>
29+
2030
<h2 id="Syntax">Syntax</h2>
2131

2232
<pre
@@ -139,7 +149,10 @@ <h3 id="Exceptions">Exceptions</h3>
139149

140150
<h2 id="Specifications">Specifications</h2>
141151

142-
{{Specifications}}
152+
<p>This feature was originally defined in the <a href="https://www.w3.org/TR/DOM-Level-2-Style">DOM Style Level 2</a> specification, but has been dropped from any
153+
standardization effort since then.</p>
154+
155+
<p>It has been superseded by a modern, but incompatible, <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a> that is now on the standard track.</p>
143156

144157
<h2 id="Browser_compatibility">Browser compatibility</h2>
145158

files/en-us/web/api/cssprimitivevalue/setstringvalue/index.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,23 @@
1010
- Deprecated
1111
browser-compat: api.CSSPrimitiveValue.setStringValue
1212
---
13-
<div>{{APIRef("DOM")}}{{deprecated_header}}</div>
13+
<div>{{APIRef("CSSOM")}}{{deprecated_header}}</div>
1414

1515
<p>The <code><strong>setStringValue()</strong></code> method of the
1616
{{domxref("CSSPrimitiveValue")}} interface is used to set a string value. If the
1717
property attached to this value can't accept the specified unit or the string value, the
1818
value will be unchanged and a {{domxref("DOMException")}} will be raised.</p>
1919

20+
<div class="notecard note">
21+
<p><strong>Note:</strong> This method was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do
22+
not implement it.</p>
23+
<p>To achieve your purpose, you can use:</p>
24+
<ul>
25+
<li>the untyped <a href="/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a>, widely supported, or</li>
26+
<li>the modern <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a>, less supported and considered experimental.</li>
27+
</ul>
28+
</div>
29+
2030
<h2 id="Syntax">Syntax</h2>
2131

2232
<pre
@@ -83,7 +93,10 @@ <h3 id="Exceptions">Exceptions</h3>
8393

8494
<h2 id="Specifications">Specifications</h2>
8595

86-
{{Specifications}}
96+
<p>This feature was originally defined in the <a href="https://www.w3.org/TR/DOM-Level-2-Style">DOM Style Level 2</a> specification, but has been dropped from any
97+
standardization effort since then.</p>
98+
99+
<p>It has been superseded by a modern, but incompatible, <a href="/en-US/docs/Web/API/CSS_Typed_OM_API">CSS Typed Object Model API</a> that is now on the standard track.</p>
87100

88101
<h2 id="Browser_compatibility">Browser compatibility</h2>
89102

0 commit comments

Comments
 (0)