2.0.3 • Published 4 years ago

@volusion/element-atomic-css v2.0.3

Weekly downloads
32
License
ISC
Repository
github
Last release
4 years ago

Atomic CSS by Volusion

A CSS library based on Tachyons for use on Element based Volusion storefronts.

Individual Stylesheets

NPM Scripts

npm scriptDescription
lessCompiles the src/less/index.less file to dist/index.css.
minifyMinifies the dist/index.css file to dist/index.min.css.
compileRuns the less script and then the minify script.
watchWatches the files in src/less/ for changes and compiles matching css files in dist. Does NOT minify the final dist/index.min.css file.

Combining Atomic CSS with custom aphrodite classes

<div
    className={joinClasses(
        'flex items-center w-100',
        css(classes.yourCustomClassA, classes.yourCustomClassB)
    )}
/>

Output:

<div class="flex items-center w-100 dynamic_custom_class"></div>

What is the joinClasses function?

That function can be found in your block props and is meant to join your classes together with some extra logic to ensure you output classlist is clean and free of unintended classes and whitespace. It will

  • Join all arguments together with a single space between each one.
  • Remove any unnecessary whitespace that might be caused before, between, or after your final classes.
  • Remove any invalid classes that might be output by bad logic (removes undefined, null, false, and additional whitespace), which is the biggest reason to use it over string literals.
2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago

1.0.0-alpha.8

5 years ago

1.0.0-alpha.7

5 years ago

1.0.0-alpha.6

5 years ago

1.0.0-alpha.5

5 years ago

1.0.0-alpha.4

5 years ago

1.0.0-alpha.3

5 years ago

1.0.0-alpha.2

5 years ago

1.0.0-alpha.1

5 years ago

1.0.0-alpha.0

5 years ago