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

Add hgroup to typings #1340

Merged
merged 1 commit into from Mar 5, 2019
Merged

Add hgroup to typings #1340

merged 1 commit into from Mar 5, 2019

Conversation

ForsakenHarmony
Copy link
Member

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 9d1510a on ts-add-missing-element into a4480c1 on master.

@ForsakenHarmony ForsakenHarmony merged commit 753d884 into master Mar 5, 2019
@ForsakenHarmony ForsakenHarmony deleted the ts-add-missing-element branch March 5, 2019 21:18
@hbroer
Copy link

hbroer commented Mar 7, 2019

hgroup is obsolet and should not be used anymore. Why is this added?
https://caniuse.com/#search=hgroup

@ForsakenHarmony
Copy link
Member Author

Emotion uses it in it's typings

@marvinhagemeister
Copy link
Member

@hbroer it was removed from the W3C HTML spec, but it is still part of the WHATWG HTML spec and implemented in all browser. Use of it is discouraged, but it's still there and will probably remain with us for a while.

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup#Usage_notes

@hbroer
Copy link

hbroer commented Mar 11, 2019

@marvinhagemeister yes i know, but adding it means that it is just now usable here for new projects. And new projects should not use it. It feels not good to add something obsolete.

Not shure what happens if browsers remove the element. Now i think it is a display:block, but default maybe will later switch to display:inline because that is the default for unknown elements AFAIK.

If that element was in that typings since a while it would be a other thing. If other frameworks supporting it, that does not count as an argument. I would not wonder if font or marquee are supported by some libs too.

My point is clear: Do not add obsolete types, force the developer to use up to date specs. If he want to use obsolete tech, then he can add his own workaround (in this case adding the typings for the obsolete element to his project locally).

Btw: My IDE tells me that hgroup is depricated when i write plain HTML. Not shure if my IDE is doing this when i write JSX. In this case you are hiding a important notice away from the developer.

webstorm

@preactjs preactjs locked as off-topic and limited conversation to collaborators Mar 11, 2019
@ForsakenHarmony
Copy link
Member Author

This was added for compatibility (emotions typings had an error because react has it but preact didn't), not just to add it

It's in no way intended to encourage people to use it, but we don't want to break existing code

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

Successfully merging this pull request may close these issues.

None yet

4 participants