The way I understand a class and would recommend to write a class in JavaScript for best readability and use.
My definition of a Class: Group of objects, functions and variables, usually commonly used (intersection).
My definition of an Object: Group of properties and their values (like JSON).
Thus, a so-called "CSS-class" is not a class, but an object, because it is a group of properties.
CSS-functions like "calc" are only the substitute for the "to-be-generated"-values of their properties.
For a clean modular structure with many classes,
the classes should be integrated in a "namespace".
For having all classes in one container and avoiding "namespace-pollution".
You could find here an example:
https://github.com/Reinerth/JS_modulePattern_ClassExample_private_public
with contextual explanation of my understanding of writing JS-code, and the definition of a class.

