Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The css value "unset" is not being reported for browsers that do not support it. #56

Closed
narthollis opened this issue Nov 30, 2016 · 8 comments
Milestone

Comments

@narthollis
Copy link

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

@ZacharyRSmith
Copy link

ZacharyRSmith commented Apr 18, 2017

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.

screen shot 2017-04-18 at 9 43 45 am

@ZacharyRSmith
Copy link

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" }],

@ismay
Copy link

ismay commented Apr 29, 2017

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.

@ZacharyRSmith
Copy link

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.

rincedd added a commit to rincedd/doiuse that referenced this issue Sep 13, 2018
Fixes anandthakker#56

As IE11 does not support 'initial' and 'unset', and 'revert' is not
yet supported by pretty much any browser, detecting their usage is
valuable to developers and would allow linters to warn about it.
@rincedd
Copy link
Contributor

rincedd commented Sep 20, 2018

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

@rincedd
Copy link
Contributor

rincedd commented Sep 26, 2018

Maybe @pkuczynski could help?

@pkuczynski
Copy link
Collaborator

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...

@pkuczynski pkuczynski added this to the Before 4.1.0 milestone Sep 27, 2018
@rincedd
Copy link
Contributor

rincedd commented Sep 27, 2018

Cool, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants