Skip to content
This repository was archived by the owner on Sep 11, 2021. It is now read-only.

Commit 15768d1

Browse files
committed
Prep for v0.1.0
1 parent 2823b95 commit 15768d1

File tree

15 files changed

+209
-188
lines changed

15 files changed

+209
-188
lines changed

.vscode/extensions.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,49 @@
1-
# Tailwind CSS Basic Form Styles
1+
# Tailwind CSS Custom Forms
22

3-
Out of the box, selects, checkboxes, and radios look awful in Tailwind and right now the only way to make them look better is with custom CSS. The goal of this experiment is to provide a better starting point for form elements that is still fairly unopinionated and easy to customize by just layering on additional utilities instead of having to write complicated CSS rules (looking at you checkboxes.)
3+
Out of the box, selects, checkboxes, and radios look awful in Tailwind and the only way to make them look better is with custom CSS.
44

5-
Preview what I've got currently here:
5+
The goal of this project is to provide a better starting point for form elements that is still fairly unopinionated, and easy to customize by adding utilities instead of having to write complicated CSS rules.
66

7-
https://nervous-knuth-fa9c3e.netlify.com/
7+
[Demo](https://nervous-knuth-fa9c3e.netlify.com/)
88

9-
## Running locally
9+
## Install
10+
11+
1. Install the plugin:
12+
13+
```bash
14+
# Using npm
15+
npm install @tailwindcss/custom-forms
16+
17+
# Using Yarn
18+
yarn add @tailwindcss/custom-forms
19+
```
20+
21+
2. Add it to your `tailwind.config.js` file:
22+
23+
```js
24+
// tailwind.config.js
25+
module.exports = {
26+
// ...
27+
plugins: [
28+
require('@tailwindcss/custom-forms')
29+
]
30+
}
31+
```
32+
33+
## Documentation
34+
35+
The project is still early but basic documentation can be found here:
36+
37+
[Read the documentation](https://nervous-knuth-fa9c3e.netlify.com/)
38+
39+
## Local development
1040

1141
1. Clone the repository:
1242

1343
```bash
14-
git clone https://github.com/adamwathan/tailwindcss-form-styles.git tailwindcss-form-styles
44+
git clone https://github.com/tailwindcss/custom-forms.git tailwindcss-custom-forms
1545

16-
cd tailwindcss-form-styles
46+
cd tailwindcss-custom-forms
1747
```
1848

1949
2. Install the dependencies:
@@ -36,4 +66,4 @@ https://nervous-knuth-fa9c3e.netlify.com/
3666
yarn run serve
3767
```
3868

39-
Now you should be able to see the project running at localhost:8080.
69+
Now you should be able to see the demo/docs running at localhost:8080.
File renamed without changes.
File renamed without changes.
File renamed without changes.

pages/index.mdx renamed to docs/pages/index.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,22 @@ import Layout from '../components/Layout'
44
export default Layout
55

66
export const meta = {
7-
title: 'Tailwind CSS Basic Form Elements',
7+
title: 'Tailwind CSS Custom Forms',
88
}
99

10-
# Tailwind CSS Basic Form Elements
10+
# Tailwind CSS CUstom Forms
1111

1212
<div className="mt-2">
13-
<a href="https://github.com/adamwathan/tailwindcss-form-styles" className="text-gray-600 hover:underline">
13+
<a href="https://github.com/tailwindcss/custom-forms" className="text-gray-600 hover:underline">
1414
View on GitHub
1515
</a>
1616
</div>
1717

18-
Out of the box, selects, checkboxes, and radios look awful in Tailwind and right now the only way to
19-
make them look better is with custom CSS.
18+
Out of the box, selects, checkboxes, and radios look awful in Tailwind and the only way to make them look
19+
better is with custom CSS.
2020

21-
To fix this, I'm working on an optional plugin that adds a few form component classes to Tailwind
22-
that are fairly unopinionated and easy to customize by layering on additional utility classes
23-
instead of being forced to write custom CSS.
21+
The goal of this project is to provide a better starting point for form elements that is still fairly
22+
unopinionated, and easy to customize by adding utilities instead of having to write complicated CSS rules.
2423

2524
---
2625

postcss.config.js renamed to docs/postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
66
module.exports = {
77
plugins: [
88
require('postcss-import'),
9-
require('tailwindcss'),
9+
require('tailwindcss')(`${__dirname}/tailwind.config.js`),
1010
require('postcss-nested'),
1111
require('postcss-custom-properties'),
1212
require('autoprefixer'),
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)