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

mdn-text-decoration-shorthand is incorrect and needs to be done something about it #174

Open
ZhukDmitryOlegovich opened this issue Oct 2, 2023 · 3 comments

Comments

@ZhukDmitryOlegovich
Copy link

Using doiuse in my project, I encountered the fact that when using the text-decoration rule I received an error message like mdn-text-decoration-shorthand. I read mdn about text-decoration and realized that:

  1. The check is not correct since the text-decoration property itself has been used since Chrome 1
  2. Checking in general is not necessary, since each of the text-decoration-... properties has its own separate checking rules (that's not accurate)
image

I can do a PR with the edits, but I couldn’t come to the conclusion that it’s better: remove this check altogether or fix it so that it only works on declaration like text-decoration-...: ... . What do you think?

@clshortfuse
Copy link
Collaborator

Hi! Thanks for filing the issue. Do you have a small css snippet so I can better understand the issue? Also note that we support more than what's on the MDN page going bas far as IE8 (though maybe we shouldn't).

I do see there's some overlap with

https://github.com/anandthakker/doiuse/blob/d453eeee02c4aa02b684c8887665faddf4e385bb/data/features/mdn-text-decoration-shorthand.js

and

https://github.com/anandthakker/doiuse/blob/d453eeee02c4aa02b684c8887665faddf4e385bb/data/features/text-decoration.js

@ZhukDmitryOlegovich
Copy link
Author

Yes, of course, I have an example

a {
	color: inherit;
	text-decoration: none;
}

and these styles work for the browser versions listed in the first line in the screenshot, but doiuse returns an error

I can also give an example caniuse (an important clarification is that only one word-value can be passed into it, so check in file text-decoration.js on 'text-decoration': /\w \w/ seems correct to me)

And yes, I meant the check from file mdn-text-decoration-shorthand.js

@ZhukDmitryOlegovich
Copy link
Author

image

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

2 participants