This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
spec:dfn-patterns [2013/07/30 11:46] – [<dfn> Types] markup tweak tabatkins | spec:dfn-patterns [2013/07/31 12:38] – added token and dictmember dfn types plinss | ||
---|---|---|---|
Line 10: | Line 10: | ||
Some types of definitions are part of some higher construct. | Some types of definitions are part of some higher construct. | ||
+ | |||
+ | " | ||
Getting this metadata right is easy and helps with auto-crossreferencing (in Tab's preprocessor) and automatically generated documentation (in Shepherd), so please get it right. | Getting this metadata right is easy and helps with auto-crossreferencing (in Tab's preprocessor) and automatically generated documentation (in Shepherd), so please get it right. | ||
Line 24: | Line 26: | ||
* function (like counter() or linear-gradient()) | * function (like counter() or linear-gradient()) | ||
* selector | * selector | ||
+ | * token | ||
There are additional categories for WebIDL definitions: | There are additional categories for WebIDL definitions: | ||
Line 31: | Line 34: | ||
* attribute | * attribute | ||
* dictionary | * dictionary | ||
+ | * dictmember | ||
* enum | * enum | ||
* const | * const | ||
Line 54: | Line 58: | ||
* Does it start with an @? Then it's an **at-rule**. | * Does it start with an @? Then it's an **at-rule**. | ||
* Is it surrounded by <>? Then it's a **type**. | * Is it surrounded by <>? Then it's a **type**. | ||
+ | * Is it surrounded by 〈〉? Then it's a **token**. | ||
* Does it start with a :? Then it's a **selector**. (This is a simplistic auto-detection for pseudo-classes and pseudo-elements.) | * Does it start with a :? Then it's a **selector**. (This is a simplistic auto-detection for pseudo-classes and pseudo-elements.) | ||
* Does it end with ()? Then it's a **function**. | * Does it end with ()? Then it's a **function**. | ||
Line 72: | Line 77: | ||
|funcdef | function| | |funcdef | function| | ||
|selectordef | selector| | |selectordef | selector| | ||
+ | |tokendef | token| | ||
|interfacedef | interface| | |interfacedef | interface| | ||
|methoddef | method| | |methoddef | method| | ||
|attrdef | attribute| | |attrdef | attribute| | ||
|dictdef | dictionary| | |dictdef | dictionary| | ||
+ | |dictmemberdef | dictmember| | ||
|enumdef | enum| | |enumdef | enum| | ||
|constdef | const| | |constdef | const| | ||
Line 95: | Line 102: | ||
|funcdef- | function| | |funcdef- | function| | ||
|selectordef- | selector| | |selectordef- | selector| | ||
+ | |tokendef- | token| | ||
|interfacedef- | interface| | |interfacedef- | interface| | ||
|methoddef- | method| | |methoddef- | method| | ||
|attrdef- | attribute| | |attrdef- | attribute| | ||
|dictdef- | dictionary| | |dictdef- | dictionary| | ||
+ | |dictmemberdef- | dictmember| | ||
|enumdef- | enum| | |enumdef- | enum| | ||
|constdef- | const| | |constdef- | const| | ||
Line 149: | Line 158: | ||
If using Tab's preprocessor, | If using Tab's preprocessor, | ||
+ | |||
+ | ===== Exporting Definitions ===== | ||
+ | |||
+ | Definitions have a concept of being " | ||
+ | |||
+ | For example, the Flexbox spec contains a definition like ''< | ||
+ | |||
+ | Conversely, if you want to *block* a particular definition from being exported (because it's only meaningful locally), add a '' | ||
+ | |||
+ | If using Tab's preprocessor, |