You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ The source CSS to process. Can be a file path, web URL, or CSS text.
101
101
*`Naming.CamelCase`: convert to camel case names with all non-alphanumeric characters removed.
102
102
*`Naming.PascalCase`: convert to Pascal case names with all non-alphanumeric characters removed.
103
103
104
-
If a naming option produces collisions, such as `card-text` and `card_text` both mapping to `CardText` in Pascal case, then the duplicate names will receive `_2`, `_3`, etc. suffixes as needed.
104
+
Note that non-verbatim naming options can produce name collisions. See the [`nameCollisions`](#nameCollisions) parameter for details.
105
105
106
106
### resolutionFolder
107
107
@@ -137,6 +137,14 @@ let activator = "activator"
137
137
...
138
138
```
139
139
140
+
### nameCollisions
141
+
142
+
If a naming option produces collisions, such as `card-text` and `card_text` CSS classes both mapping to a `CardText` property in Pascal case, then the duplicate names will be handled according to this option.
143
+
144
+
-`NameCollisions.BasicSuffix`: (default) The base property name will refer to the closest text match, and additional properties will receive `_2`, `_3`, etc. suffixes as needed. Note that if this option is used during ongoing CSS development, it can cause existing properties to silently change to refer to different classes if collisions are introduced that affect the base name and number determination.
145
+
-`NameCollisions.ExtendedSuffix`: All property names involved in a collision will receive an extended numbered suffix such as `__1_of_2`, `__2_of_2`. This option is safer for ongoing development since any introduced collision will change all involved names and produce immediate compiler errors where the previous names were used.
146
+
-`NameCollisions.Omit`: All colliding properties will be omitted from the generated type. This option is safer for ongoing development since any introduced collision will remove the original property and produce immediate compiler errors wherever it was used.
147
+
140
148
## Notes
141
149
142
150
As with all type providers, the source CSS file must be available at both design time and build time.
0 commit comments