Socket
Book a DemoInstallSign in
Socket

@volusion/element-atomic-css

Package Overview
Dependencies
Maintainers
20
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volusion/element-atomic-css

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

2.0.3
latest
Source
npmnpm
Version published
Maintainers
20
Created
Source

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.

FAQs

Package last updated on 29 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.