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

Add output variables to better control base output #265

Merged
merged 31 commits into from Jul 25, 2020
Merged

Conversation

sebnitu
Copy link
Owner

@sebnitu sebnitu commented Jul 24, 2020

Problem

There's currently no control over what gets output when @vrembem/base is included in a project.

Solution

To better control the base output, this PR introduces the $output and $output-[module] variables that take a boolean value and will either enable or disable a modules CSS output. Setting $output will be passed to all other module output variables as their default option. This allows you to disable all modules and add only the ones you need vs having them all output by default and disable the ones you don't need.

Examples

// Will disable the output of the type module
@use "@vrembem/base" with (
  $output-type: false
);

// Will disable all modules, but enables the base module
@use "@vrembem/base" with (
  $output: false,
  $output-base: true
);

Additional changes

This PR also does the following:

  • Moves spacing into the base component
  • Adds $spacing and $spacing-map vars to core
  • Both base and utility components pass core spacing variables as their defaults for equivalent variables
  • Adds scroll-box() mixin

Also adds spacing and spacing-map vars to core which base and utility use as their default values.
@sebnitu sebnitu merged commit 685c237 into master Jul 25, 2020
@sebnitu sebnitu deleted the base-output-control branch July 25, 2020 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant