Autoprefixer: HTML5 Input range styling

Created on 14 Jul 2014  路  6Comments  路  Source: postcss/autoprefixer

It seems that autoprefixer could help here.

When styling HTML5 range input we have various pseudo selectors:

::-webkit-slider-thumb
::-moz-range-thumb
::-moz-range-track

I haven't done the careful research about how to maximize compatibility etc. and other possible selectors, but just wanted to first get this out and see if there's something to be done or not.

Most helpful comment

postcss-input-range does the trick.

All 6 comments

Also one reason this might not be supported is if there is no spec for it but rather just vendor proprietary selectors etc.

Main problem here, that we absolutly didn鈥檛 know unprefixed version of this selectors. Autoprefixer is developed to be able to remove Autoprefixer and future and your CSS will be worked.

There is only ony exception, ::placeholder. But we use most likely variant.

Try PostCSS and create polyfill.

postcss-input-range does the trick.

Are we sure about unprefixed version?

It looks like the plugin fabb linked doesn't output any unprefixed code in the final CSS.

It seems to introduce it's own syntax and split it into the various browser specific prefixes. It removes it's proprietary CSS from the output.

FYI, this is a good thing. It means that the pseudo selectors fabb used could still be turned into a real W3C spec one day.

Was this page helpful?
0 / 5 - 0 ratings