style-utils
style css for tween-one and queue-anim
Last updated 6 years ago by jljsj33 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install style-utils 
SYNC missed versions from official npm registry.

style-utils

tween-one 和 scroll-anim, queue-anim 的样式

color 和 transform 的分解..

toCssLowerCase(v)

toCssLowerCase('lineHeight') => line-height;

toStyleUpperCase(d)

toStyleUpperCase('line-height') => lineHeight;

checkStyleName(p)

checkStyleName('filter') => WebkitFilter | MsFilter | MozFilter

parseColor(value)

parseColor('#ff0') => [255,255,0,1]; parseColor('#ffff00') => [255,255,0,1]; parseColor('#ffff0080') => [255,255,0,0.5]; parseColor('rgb(255,255,0)') => [255,255,0,1]; parseColor('rgba(255,255,0,0.5)') => [255,255,0,0.5]; parseColor('hsl(60, 100%, 50%)') => [255,255,0,1]; parseColor('hsl(60deg 100% 50%)') => [255,255,0,1]; parseColor('hsl(60 100% 50% / 50%)') => [255,255,0,0.5]; parseColor('hsla(60,100%,50%,0.5)') => [255,255,0,0.5];

parseShadow(v, key);

parseShadow('0 10px 10px #ffff00', 'text-shadow') => ['0', '10px', '10px', 255, 255, 0, 1];

getColor(v)

getColor([255,255,0]) => rgb(255,255,0);

getTransform(transform)

getTransform('translateX(100px) rotate(30deg)') => {translateX: 100, translateY: 0, rotate: 30, ...}

mergeStyle(current, change)

mergeStyle('translate(30px,50em)', 'translateY(20em)') => translate(30px, 20em)

Current Tags

  • 0.3.4                                ...           latest (6 years ago)

35 Versions

  • 0.3.4                                ...           6 years ago
  • 0.3.3                                ...           6 years ago
  • 0.3.2                                ...           6 years ago
  • 0.3.1                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.24                                ...           7 years ago
  • 0.1.23                                ...           7 years ago
  • 0.1.22                                ...           7 years ago
  • 0.1.21                                ...           8 years ago
  • 0.1.20                                ...           8 years ago
  • 0.1.19                                ...           8 years ago
  • 0.1.18                                ...           8 years ago
  • 0.1.17                                ...           8 years ago
  • 0.1.16                                ...           8 years ago
  • 0.1.15                                ...           8 years ago
  • 0.1.14                                ...           8 years ago
  • 0.1.13                                ...           9 years ago
  • 0.1.12                                ...           9 years ago
  • 0.1.11                                ...           9 years ago
  • 0.1.10                                ...           9 years ago
  • 0.1.9                                ...           9 years ago
  • 0.1.8                                ...           9 years ago
  • 0.1.7                                ...           10 years ago
  • 0.1.6                                ...           10 years ago
  • 0.1.5                                ...           10 years ago
  • 0.1.4                                ...           10 years ago
  • 0.1.3                                ...           10 years ago
  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
  • 0.0.3                                ...           10 years ago
  • 0.0.2                                ...           10 years ago
  • 0.0.1                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 15
Last Month 16
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |