-
Notifications
You must be signed in to change notification settings - Fork 40
Nomenclature (for Developers)
Tony Boyles edited this page Sep 17, 2018
·
1 revision
Note: If you're a MicrobeTrace User, this section is unlikely to mean anything or be on any use to you.
In general, MicrobeTrace tries to adhere to the following style guide:
- everything should have context-revealing names.
MicrobeTrace uses Bootstrap for most layouts and elements, so the majority of classes and names come from that. However, we also want to use names that are broadly consistent with Bootstrap's style so:
-
id
s andclass
es should be all-lower-case, hyphen-delimited (i.e. kebab case)
-
function
s andvar
iables (either globally- or locally- scoped) will be camelCase -
Object
keys should also be camelCase, unless the keys map directly to some HTML or CSS element (see, for example,session.style.widgets
) -
event
s (that are unique to MicrobeTrace) should be kebab-case
Copyright 2017-2018 Centers for Disease Control and Prevention • Acknowledgements