-
Notifications
You must be signed in to change notification settings - Fork 132
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
Proposal: faster way to id and classes #153
Comments
|
@orenelbaum it's not ambiguous because this syntax can only be used on native elements and native elements don't have properties like that. |
Define native? Is a-b native? Also: a.b is a member expression, component b from object a, I think that's what's meant here |
Native as in "name of a tag that's supported by the browser by default". Though I suppose this syntax should work for any kind of element/component? 🤔 I wasn't thinking about that for some reason. In that case sure, without a space its ambiguous. |
Here’s the rules quoted from the MDX site:
|
|
Why not adding these shortcuts as user snippets in your code editor? |
Using CSS Selector Syntax to create components:
<div#myId />
as shortcut of<div id="myId">
<div#.my-class />
as shortcut of<div className="my-class"/>
<div#myId.my-class />
as shortcut of<div id="myId" className="my-class" />
<div#myId.c1.c2.c3 />
as shortcut of<div id="myId" className="c1 c2 c3" />
The text was updated successfully, but these errors were encountered: