3.0.0 • Published 3 years ago

@booleon/core v3.0.0

Weekly downloads
37
License
MIT
Repository
github
Last release
3 years ago

Booleon core is a collection of functions with a goal to manipulate and compile CSS, based on boolean props.

NPM version NPM version NPM version NPM version NPM version

Get Started

Instalation

npm i @booleon/core
yarn add @booleon/core

Functions

// https://github.com/kripod/style-vendorizer/blob/main/src/index.ts
function browserPrefixer('position:sticky;'): 'position:-webkit-sticky;position:sticky;'

function categorizeProps({
  prop: true,
  dark__prop: true,
}): [{ prop: true, }, { dark__prop: true, }]

function classCompiler('class', { css: 'css' }): '.class { css }'

function cssCompiler('flex', true, { flex: () => 'display:flex;' }): 'display:flex;'

function filterProps({ custom: true, id: 'id' }): [
  { custom: true },
  { id: 'id' },
]

function propsReducer({ flex: true }, { flex: () => 'display:flex;' }): { css: 'display:flex;' }

// https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript#7616484
function stringHash('stringHash'): -1573444417

function styleAppender('className', () => 'css'): <style data-booleon="className">.className{css}</style>

function uniqueClass('flex', 'flex', 'grid', 'grid'): 'flex grid'
3.0.0

3 years ago

2.0.4-alpha.0

3 years ago

2.0.2-alpha.0

3 years ago

2.0.0-alpha.0

3 years ago

1.2.0-alpha.0

3 years ago

1.1.0-alpha.0

3 years ago

1.0.1-alpha.0

3 years ago

1.0.0-alpha.0

3 years ago

0.2.2-alpha.0

4 years ago

0.2.1-alpha.0

4 years ago

0.1.7-alpha.0

4 years ago

0.1.6-alpha.0

4 years ago

0.1.5-alpha.0

4 years ago

0.1.4-alpha.0

4 years ago

0.1.3-alpha.0

4 years ago

0.1.2-alpha.0

4 years ago

0.1.1-alpha.0

4 years ago

0.1.0-alpha.0

4 years ago