Skip to content

Make this like the lodash of sass frameworks #46

@renatodeleao

Description

@renatodeleao

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions