Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-input-style

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-input-style

Adds new pseudo-elements to inputs for easy cross-browser styling of their Shadow-DOM elements

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
increased by50.25%
Maintainers
1
Weekly downloads
 
Created
Source

postcss-input-style

NPM version Build Status Dependency Status

PostCSS plugin that adds new pseudo-elements to inputs for easy cross-browser styling of their Shadow-DOM elements.

Note that the output selectors generated (below) are not grouped because if a browser finds a single selector it doesn't understand in a group, the whole group is ignored (see Selectors Level 3)

Placeholders

Input

input::placeholder {
  color: black;
  opacity: 0.8;
}

Output

input::-webkit-input-placeholder {
  color: black;
  opacity: 0.8;
}

input:-moz-placeholder {
  color: black !important;
  opacity: 0.8;
}

input::-moz-placeholder {
  color: black !important;
  opacity: 0.8;
}

input:-ms-input-placeholder {
  color: black !important;
  opacity: 0.8;
}
Range elements

Input

input[type="range"]::track {
  background: #9d9d9d;
  height: 3px;
}

input[type="range"]::thumb {
  background: #4286be;
  width: 16px;
  height: 8px;
}

Output

input[type="range"]::-webkit-runnable-track {
  -webkit-appearance: none !important;
  background: #9d9d9d;
  height: 3px;
}

input[type="range"]::-moz-range-track  {
  -moz-appearance: none !important;
  background: #9d9d9d;
  height: 3px;
}

input[type="range"]::-ms-track  {
  background: #9d9d9d;
  height: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  background: #4286be;
  width: 16px;
  height: 8px;
}

input[type="range"]::-moz-range-thumb {
  -moz-appearance: none !important;
  background: #4286be;
  width: 16px;
  height: 8px;
}

input[type="range"]::-ms-thumb {
  background: #4286be;
  width: 16px;
  height: 8px;
}

Usage

postcss([ require('postcss-input-style') ])

See PostCSS docs for examples for your environment.

--

License

MIT © Sean King

Keywords

FAQs

Package last updated on 15 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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