
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
postcss-input-style
Advanced tools
Adds new pseudo-elements to inputs for easy cross-browser styling of their inner elements
PostCSS plugin that adds new pseudo elements to inputs for easy cross-browser styling of their inner elements. Currently the only input supported is Range, more will be added as more vendor-specific pseudo selectors are made available.
Part of Rucksack - CSS Superpowers
Input
input[type="range"]::track {
background: #9d9d9d;
height: 3px;
}
input[type="range"]::thumb {
background: #4286be;
width: 16px;
height: 8px;
}
Output
input[type="range"]::-webkit-slider-runnable-track {
-webkit-appearance: none;
background: #9d9d9d;
height: 3px;
}
input[type="range"]::-moz-range-track {
-moz-appearance: none;
background: #9d9d9d;
height: 3px;
}
input[type="range"]::-ms-track {
background: #9d9d9d;
height: 3px;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
background: #4286be;
width: 16px;
height: 8px;
}
input[type="range"]::-moz-range-thumb {
-moz-appearance: none;
background: #4286be;
width: 16px;
height: 8px;
}
input[type="range"]::-ms-thumb {
background: #4286be;
width: 16px;
height: 8px;
}
input[type="range"] {
-webkit-appearance: none;
}
input[type=range]::-moz-focus-outer {
border: 0;
}
Notes on output:
Selectors 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)
-[vendor]-appearance: none;
is added so your custom styles apply. On Chrome and Safari this means you must style both ::track
and ::thumb
, since the appearance must be set on the root element as well
The additional ::-moz-focus-outer
rule removes the inconsistent dotted focus outline on firefox.
postcss([ require('postcss-input-style') ])
See PostCSS docs for examples for your environment.
MIT © Sean King
FAQs
Adds new pseudo-elements to inputs for easy cross-browser styling of their inner elements
The npm package postcss-input-style receives a total of 6,099 weekly downloads. As such, postcss-input-style popularity was classified as popular.
We found that postcss-input-style demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.