1.14.0 • Published 22 days ago

theft v1.14.0

Weekly downloads
2
License
ISC
Repository
github
Last release
22 days ago

theft (a PostCSS plugin)

Means of transporting CSS rule declarations from one file to another.

Calling the theft plugin multiple times...

const postcss = require('postcss');
const theft = require('./index.js');

  postcss([
    theft({url:'http://localhost/bootstrap.css', source: ['.btn', '.text-muted'], target:'.my-button' }),
    theft({url:'http://localhost/bootstrap.css', source: ['.text-uppercase'], target:'.my-button' })

    theft({css:`.love-button { background: red ! important; }`, source: ['.love-button'], target:'.my-button' }),

  ])

  .process(`.my-button {}`)

  .then(result => { console.log( result.css ) })
  .catch(err => { console.error( err ) });

...results in the following CSS:

.my-button {
  display: inline-block;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 1px solid transparent;
  padding: .5rem 1rem;
  font-size: 1rem;
  border-radius: .25rem;
  -webkit-transition: all .2s ease-in-out;
  -o-transition: all .2s ease-in-out;
  transition: all .2s ease-in-out;
  color: #636c72!important;
  text-transform: uppercase!important;
  background: red!important;
}
1.14.0

22 days ago

1.13.0

8 months ago

1.12.0

10 months ago

1.11.0

1 year ago

1.10.0

1 year ago

1.9.0

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

5 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago