Closed narthollis closed 5 years ago
From what I can tell looking at the source code, no unsupported values are being checked -- only unsupported property-value pairs.
It might be worth it to have the Detector check ALL features, and whenever an unsupported value is used (such as unset
or initial
for IE), throw a warning.
My workaround:
I'm using stylelint to run doiuse, in addition to other linting. To warn about "initial" and "unset", I have the below rule in my .stylelintrc
. The built-in rule 'declaration-property-value-blacklist' blacklists the property-value pair I give it. The pair I give it is:
property: "/^.*/" (match all regex) value: ["initial", "unset"]
So, all properties with a value of "initial" or "unset" will throw a violation.
I set the violation severity to warning.
"declaration-property-value-blacklist": [{
"/^.*/": ["initial", "unset"]
}, { "severity": "warning" }],
From what I can tell looking at the source code, no unsupported values are being checked -- only unsupported properties.
By the way, it isn't just properties that are checked. I do get warnings for using rem
for example. No idea why unset
isn't being reported.
I should have said "unsupported property-value pairs". My guess is the code checks all properties known to use rem
, then complains if it sees rem
. But yeah, weird that it wouldn't do the same for unset
etc.
Hi @anandthakker,
I fixed this in #93. I'd be happy to work on a few other issues as well. Could you provide write access to the repo, as mentioned in the contribution guideline? Otherwise please consider the PR.
Thanks, Gerd
Maybe @pkuczynski could help?
I just merged your PR and can release the new version soon. When it comes to writing access to the repo, you have to talk with @anandthakker directly as I do not have permissions to grant rights...
Cool, thanks a lot!
Many browsers do not support the CSS value
unset
which is used for resetting a css attribute as back to its default inherit/initial value.Currently doiuse is not reporting this when testing with browsers who do not have this value.
http://caniuse.com/#feat=css-unset-value