Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make this like the lodash of sass frameworks #46

Open
renatodeleao opened this issue Dec 10, 2019 · 0 comments
Open

Make this like the lodash of sass frameworks #46

renatodeleao opened this issue Dec 10, 2019 · 0 comments

Comments

@renatodeleao
Copy link
Collaborator

renatodeleao commented Dec 10, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant