-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
With new exciting possibilities of sass modules, i think we should look at a way to modularize this library into independent modules to be used.
For instance i usually only need some nuggets like the skeleton object, i don't need the whole @whitesmith/qnorr-styles
library. I just need this particular modules. You can stay that we already can do that nowadays, but as it is would require the following:
yarn add @whitesmith/qnorr-tyles
// UFF
@import "@whitesmith/qnorr-styles/settings"; // variables
@import "@whitesmith/qnorr-styles/tools"; // mixins for skeleton object
@import "~@mappy-breakpoints"; // possible responsive variants
// now we can do it
@import "@whitesmith/qnorr-styles/objects/o.skeleton"
Proposal
investigating the possibility of an architecture similar to lodash
modules. where each module is a isolated from the core, although it may @use
feature from them.
yarn add @whitesmith/qnorr-styles.skeleton
@use 'sass:meta';
@include meta.load-css(
'@whitesmith/qnorr-styles.skeleton',
$with: ('some-config': value)
);
Don't need the css code, but would like to use the mixins anyways?
@use '@whitesmith/qnorr-styles.skeleton' as qnorrSkeleton;
.my-selector {
@include qnorrSkeleton.skeletonBody();
}
Architectural inspiration lodash, here's a sample module