I would like to move our stylesheets into a honeycrisp directory so that we can more easily override specific modules in our host applications. I think this would make Honeycrisp as a whole a bit more modular, which would support projects like CMR or GYR to implement new styles without overriding or ripping out Honeycrisp as a whole.
Current state
Currently, our modules from Honeycrisp are imported at the root of their asset search path (not namespaced). So our import file would currently look the same as cfa_styleguide_main.scss, or:
This means if we have the same filestructure in our apps (atoms, molecules, organisms) it's hard to differentiate which imports are ours vs Honeycrisp's. From what I can tell, we also need to name ours differently, if selectively importing.
Proposed change
If we were to move our stylesheets into a honeycrisp directory, we could instead reference them like so:
Bootstrap is a good example of a library that uses this technique. The stylesheets path: https://github.com/twbs/bootstrap-rubygem/tree/master/assets/stylesheets/bootstrap, which can then be referenced in application.scss as:
Impact of change
I think that because all of our apps currently import stylesheets through the manifest (cfa_styleguide_main), there will be no impact to host applications. But, it would immediately help us on CMR, since we are beginning to import specific modules.
Possible related changes
Namespace Javascript and images: It also seems that bootstrap does the same with Javascript. I think that's reasonable and am pro moving them, along with our image files. I believe both images and Javascript moves might be breaking changes for teams, so would like to handle them independent of this issue.
Update SCSS files to leverage Sass modules. Of note: One year after this deprecation goes into effect (1 October 2022 at latest), we will drop support for @import and most global functions entirely. This will involve a major version release for all implementations.
I would like to move our stylesheets into a
honeycrisp
directory so that we can more easily override specific modules in our host applications. I think this would make Honeycrisp as a whole a bit more modular, which would support projects like CMR or GYR to implement new styles without overriding or ripping out Honeycrisp as a whole.Current state
Currently, our modules from Honeycrisp are imported at the root of their asset search path (not namespaced). So our import file would currently look the same as
cfa_styleguide_main.scss
, or:This means if we have the same filestructure in our apps (
atoms
,molecules
,organisms
) it's hard to differentiate which imports are ours vs Honeycrisp's. From what I can tell, we also need to name ours differently, if selectively importing.Proposed change If we were to move our stylesheets into a
honeycrisp
directory, we could instead reference them like so:Bootstrap is a good example of a library that uses this technique. The stylesheets path:
https://github.com/twbs/bootstrap-rubygem/tree/master/assets/stylesheets/bootstrap
, which can then be referenced inapplication.scss
as:Impact of change I think that because all of our apps currently import stylesheets through the manifest (
cfa_styleguide_main
), there will be no impact to host applications. But, it would immediately help us on CMR, since we are beginning to import specific modules.Possible related changes