Skip to content

Commit 48ebd83

Browse files
committed
Init repository
0 parents  commit 48ebd83

File tree

4 files changed

+116
-0
lines changed

4 files changed

+116
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_STORE
2+
node_modules

index.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports = function (variants) {
2+
return function ({ addUtilities }) {
3+
addUtilities(
4+
{
5+
// Background
6+
7+
// Background Attachment
8+
'.bg-scroll': { backgroundAttachment: 'scroll' },
9+
'.bg-fixed': { backgroundAttachment: 'fixed' },
10+
'.bg-local': { backgroundAttachment: 'local' },
11+
12+
// Background Clip
13+
'.bg-clip-border': { backgroundClip: 'border-box' },
14+
'.bg-clip-padding': { backgroundClip: 'padding-box' },
15+
'.bg-clip-content': { backgroundClip: 'content-box' },
16+
'.bg-clip-text': { backgroundClip: 'text' },
17+
18+
// Background Color
19+
// Background Image
20+
21+
// Background Origin
22+
'.bg-origin-border': { backgroundOrigin: 'border-box' },
23+
'.bg-origin-padding': { backgroundOrigin: 'padding-box' },
24+
'.bg-origin-content': { backgroundOrigin: 'content-box' },
25+
26+
// Background Position
27+
// Background Position X
28+
// Background Position Y
29+
30+
// Background Repeat
31+
// '.bg-repeat-x': { backgroundRepeat: 'repeat-x' },
32+
// '.bg-repeat-y': { backgroundRepeat: 'repeat-y' },
33+
// '.bg-repeat': { backgroundRepeat: 'repeat' },
34+
'.bg-space': { backgroundRepeat: 'space' },
35+
'.bg-round': { backgroundRepeat: 'round' },
36+
// '.bg-no-repeat': { backgroundRepeat: 'no-repeat' },
37+
38+
// Background Size
39+
40+
},
41+
variants
42+
)
43+
}
44+
}

package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "tailwindcss-background-extended",
3+
"version": "0.1.0",
4+
"description": "This plugin adds all of the missing background utilities to Tailwind CSS.",
5+
"license": "MIT",
6+
"main": "index.js",
7+
"repository": {
8+
"type": "git",
9+
"url": "git+https://github.com/hacknug/tailwindcss-background-extended.git"
10+
},
11+
"keywords": [
12+
"tailwind",
13+
"tailwindcss",
14+
"tailwind css",
15+
"tailwindcss-plugin",
16+
"plugin"
17+
],
18+
"author": {
19+
"name" : "Nestor Vera",
20+
"email" : "nestorvera@me.com",
21+
"url" : "https://nestor.rip/"
22+
},
23+
"bugs": {
24+
"url": "https://github.com/hacknug/tailwindcss-background-extended/issues"
25+
},
26+
"homepage": "https://github.com/hacknug/tailwindcss-background-extended#readme"
27+
}

readme.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Tailwind CSS Background Extended Plugin
2+
3+
This plugin adds all of the missing background utilities to Tailwind CSS.
4+
5+
## Installation
6+
7+
Add this plugin to your project:
8+
9+
```bash
10+
# Install using npm
11+
npm install --save-dev tailwindcss-background-extended
12+
13+
# Install using yarn
14+
yarn add -D tailwindcss-background-extended
15+
```
16+
17+
## Notes
18+
19+
I will be adding support for creating classes for `background-image`, `background-position` and `background-size` soon-ish. Feel free to open an issue if you need it before I get to it.
20+
21+
## Usage
22+
23+
```js
24+
require('tailwindcss-background-extended')(['responsive'])
25+
```
26+
27+
```css
28+
.bg-scroll { background-attachment: scroll; }
29+
.bg-fixed { background-attachment: fixed; }
30+
.bg-local { background-attachment: local; }
31+
32+
.bg-clip-border { background-clip: border-box; }
33+
.bg-clip-padding { background-clip: padding-box; }
34+
.bg-clip-content { background-clip: content-box; }
35+
.bg-clip-text { background-clip: text; }
36+
37+
.bg-origin-border { background-origin: border-box; }
38+
.bg-origin-padding { background-origin: padding-box; }
39+
.bg-origin-content { background-origin: content-box; }
40+
41+
.bg-space { background-repeat: space; }
42+
.bg-round { background-repeat: round; }
43+
```

0 commit comments

Comments
 (0)