sal icon indicating copy to clipboard operation
sal copied to clipboard

Configurable scss

Open Levdbas opened this issue 3 years ago • 3 comments

Hi and first of all, thank you! Sal feels like the spiritual successor of AOS. One thing I would really love to see is a way to customize the generated css.

This should be possible by making over-writable scss variables by using the !default parameter.

Thinks I suggest in the scss:

Overwritable easings This way you are able to remove easings you don't use and make the bundle size smaller.

$sal-easings: (
....
) !default;

Configurable timings and delays This way you are able to add or remove timings.


$amount-of-timings: 40 !default;
$amount-of-delay: 20 !default;

@for $i from 4 through $amount-of-timings {
  [data-sal][data-sal-duration='#{$i * 50}'] {
    transition-duration: #{$i * 0.05}s;
  }
}

@for $i from 1 through $amount-of-delays {
  [data-sal][data-sal-delay='#{$i * 50}'] {
    transition-delay: #{$i * 0.05}s;
  }
}

I'd like to hear your thoughts!

Levdbas avatar Mar 24 '21 14:03 Levdbas

I like both ideas! Could you create a PR with these changes?

mciastek avatar May 01 '21 16:05 mciastek

Will do @mciastek , I will notify you here once the PR is ready.

Levdbas avatar May 01 '21 19:05 Levdbas

See #84

Levdbas avatar May 02 '21 18:05 Levdbas