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

Html elements types list #561

Closed
ariannargesi opened this issue Feb 22, 2022 · 1 comment
Closed

Html elements types list #561

ariannargesi opened this issue Feb 22, 2022 · 1 comment

Comments

@ariannargesi
Copy link

I'm working on a application that allow users, to build their own react component and I'm using repo as a reference for showing css properties to users.

Today I notice that technically we can't apply all css properties for each html element. from what is see in css/propeties.json file, html element have a type/kind. because in that file all objects have a "appliesto" property that tells us about the tags that accept this properties.

Example
flex
"appliesto": "flexItemsAndInFlowPseudos"

margin
"appliesto": "allElementsExceptTableDisplayTypes",

Is their any file that tell me the type of each html element so I can render only properties that can apply to certion html tag?

@teoli2003
Copy link
Contributor

Unfortunately no, these are just keys to help translate the text in different languages.

It may be useful, but these are not necessarily elements "tags", it depends on the context: flex items are elements that are inside an element with 'display:flex'. So a <div> may or may not be a flex item depending on the context.

I don't see how to do this better than the text, so I'm closing this. (Feel free to reopen if you think you have a solution)

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