CrankShaft
CrankShaft copied to clipboard
Idea: Separation of Concerns
So I was thinking about - how can we build this framework in a way that takes advantage of HubSpot's platform and the way Design Manager 2 works.
One idea I had was - what if we separate the grid css from the rest of the styles completely, so it would be it's own css file.
Here's the thought behind it. Say someone wants to build a custom module, and they want to take advantage of the grid within the custom module. If they take advantage of it for the module, then the module is no longer self contained, it requires anyone installing it to use this theme. If it's done as it's own file it can be set as a dependency for both the template AND the modules.
That way the grid is only loaded once - the module is re-usable across sites(great for the marketplace).
Then it also allows people to easily grab just the parts of this framework they want. Some people might not want default styling for elements or even the HS default modules, but they want the grid. This way they can do that very easily.
Grid is separated in proposed structure found in #22