Socket
Socket
Sign inDemoInstall

@tailwindcss/forms

Package Overview
Dependencies
Maintainers
3
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tailwindcss/forms - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

6

package.json
{
"name": "@tailwindcss/forms",
"version": "0.1.0",
"version": "0.1.1",
"main": "src/index.js",

@@ -22,8 +22,8 @@ "license": "MIT",

"clean-css": "^4.2.1",
"postcss": "^7.0.17",
"tailwindcss": "^2.0.0-alpha.14"
"postcss": "^7.0.17"
},
"dependencies": {
"tailwindcss": "^2.0.0-alpha.15",
"mini-svg-data-uri": "^1.2.3"
}
}

@@ -5,3 +5,2 @@ # @tailwindcss/forms

## Installation

@@ -36,2 +35,55 @@

All of the basic form elements you use will now have some sensible default styles that are easy to override with utilities. Works basically like the `@tailwindcss/custom-forms` plugin in terms of how you modify things using utility classes. More details eventually.
All of the basic form elements you use will now have some sensible default styles that are easy to override with utilities.
Currently we add basic utility-friendly form styles for the following form element types:
- `input[type='text']`
- `input[type='password']`
- `input[type='email']`
- `input[type='number']`
- `input[type='url']`
- `input[type='date']`
- `input[type='datetime-local']`
- `input[type='month']`
- `input[type='week']`
- `input[type='time']`
- `input[type='search']`
- `input[type='tel']`
- `input[type='checkbox']`
- `input[type='radio']`
- `select`
- `select[multiple]`
- `textarea`
**Note that for text inputs, you must add the `type="text"` attribute for these styles to take effect.** This is a necessary trade-off to avoid relying on the overly greedy `input` selector and unintentionally styling elements we don't have solutions for yet, like `input[type="range"]` for example.
Every element has been normalized/reset in a way that they look pretty great without doing anything to them at all:
```html
<!-- This just looks good! -->
<input type="text">
```
The real benefit of this plugin however is that all of these elements are easy to modify on the fly with utilities, which is not possible with user agent form styles:
```html
<!-- You can customize padding on a select element! Oh my god! -->
<select class="px-4 py-3 rounded-full">
<!-- ... -->
</select>
```
We've baked in a few useful tricks, like making the checkbox and radio controls use `currentColor` for their checked state, so you can even customize how those look using text color utilities:
```html
<!-- This will be blue when checked -->
<input type="checkbox" class="text-blue-500">
<!-- This will be pink when checked -->
<input type="checkbox" class="text-pink-500">
<!-- This will be green when checked -->
<input type="checkbox" class="text-green-500">
```
More customization examples and best practices coming soon.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc