lowcss-forms
Version:
A simple reset for form elements so can be styled with LowCSS
83 lines (59 loc) • 2.11 kB
Markdown
A simple CSS reset for form elements that makes them easy to style with LowCSS utility classes.
You can install lowcss-forms via **npm** or **yarn**:
```bash
$ npm install lowcss-forms
$ yarn add lowcss-forms
```
- Normalizes form elements across browsers.
- Makes form elements more consistent and easier to style.
- Removes browser-specific styling for a clean base.
- Designed to work seamlessly with LowCSS utility classes.
- Lightweight and focused on the most common form elements.
Import the reset in your project using either ES modules or by linking the CSS file directly in your HTML:
```js
// Using ES modules
import "lowcss-forms";
```
```html
<!-- Or reference it in your HTML -->
<link rel="stylesheet" href="node_modules/lowcss-forms/index.css">
```
After importing, form elements will have consistent base styling that you can customize using LowCSS utility classes:
```html
<input type="text" class="border-1 border-gray-200 rounded-md focus:border-blue-500 w-full">
<select class="border-1 border-gray-200 rounded-md bg-white">
<option>Option 1</option>
<option>Option 2</option>
</select>
```
This package includes resets for the following form elements:
- Input types: text, email, url, password, number, date, datetime, datetime-local, month, tel, time, week.
- Removes default appearances.
- Standardizes sizing and padding.
- Normalizes placeholder styling.
- Removes default appearance.
- Sets consistent sizing.
- Provides clean checked/indeterminate states with SVG backgrounds.
- Makes them easy to customize with color utilities.
- Removes browser-specific styling.
- Provides consistent slider thumb appearance.
- Enables easy customization.
- Removes default appearance.
- Adds custom caret icon.
- Standardizes padding and appearance.
- Normalizes appearance.
- Standardizes placeholder styling.
Licensed under the [MIT License](../../LICENSE).