isPredefinedName static method
Check if name is a pre-defined CSS name. Used by error handler to report if name is unknown or used improperly.
Implementation
static bool isPredefinedName(String name) {
var nameLen = name.length;
// TODO(terry): Add more pre-defined names (hidden, bolder, inherit, etc.).
if (matchUnits(name, 0, nameLen) == -1 ||
matchDirectives(name, 0, nameLen) == -1 ||
matchMarginDirectives(name, 0, nameLen) == -1 ||
matchColorName(name) == null) {
return false;
}
return true;
}