File: types.md

package info (click to toggle)
node-mdn-data 2.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,028 kB
  • sloc: javascript: 98; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Types

[data](https://github.com/mdn/data/blob/main/css/types.json) |
[schema](https://github.com/mdn/data/blob/main/css/types.schema.json)

[CSS basic data types](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Types) define the kinds of values (keywords and units) accepted by CSS properties and functions.

## Structure for types

A type object looks like the following example.

```json
"length": {
  "groups": [
    "CSS Types"
  ],
  "status": "standard"
},
```

The 2 properties are both required.
* `groups` (array of strings): CSS is organized in modules like "CSS Types" or "CSS Color". MDN organizes features in these groups as well — `groups` should contain the name of the module(s) the type is defined in.
* `status` (enum string): This is either `standard`, `nonstandard`, `experimental` or `obsolete` depending on the standardization status of the feature.

There is another property that is optional:
* `mdn_url` (string): a URL linking to the type's page on MDN. This URL must omit the localization part of the URL (such as `en-US/`).