-
Notifications
You must be signed in to change notification settings - Fork 47
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
class
property was broken, like pugdiv( class="container" )
#111
Comments
@shirohana my intention was to avoid own aliases and just pass everything what we have to jsx. With Do you prefer using |
It it surprised me that the The Just because we can use Pug as our preprocessor of JSX, we can avoid some bad design of JSX, like ugly optional rendering condition, ugly array iteration, meaningless closing-tag, and so many reasons that drive us to find a better workaround, that is why this plugin be existed. |
We're looking for a solution, not another JSX-like alternatives. (´・ω・`ʃ♡ƪ) |
Is it any plan for this (´・ω・`)? |
@ezhlobo Could you give us an option that we can map |
@shirohana @billypon hey ✋, I feel sad that I made you waiting for too long. I thought a bit about that and now I tend to agree that we need to have a map between Also, the message like |
@ezhlobo In case you want to add the |
@JeanPaulVB These all other CSS attributes were created for JSX that makes almost DOM Element Attributes to be a valid JS Identifier (like variable names), but Pug is just a HTML-preprocessor, no need to be compatible with JavaScript, as I think (´・ω・`) |
@shirohana But the PUG attributes do need to be compatible with React right? Hence a pure Pug to JSX mapping (like |
@JeanPaulVB Yeah that is what I expect this plugin does :D ✅I'd like that do: .container
label( for="email" )
input#email( type="text" ) ❌but not: .container
label( html-for="email" )
input#email( type="text" ) ❌and never: .container
label( htmlFor="email" )
input#email( type="text" ) this plugin done that pretty well in this example, and I hope it can also applies on |
Any plans to revert to allowing “class” (as in Pug language spec) in place of “className” (as in JS/JSX)? |
Hi, Currently I have a plan to make a new option to allow using:
in same time, just like alias that works well before. with options like:
|
@shirohana @ezhlobo Are there any updates or reasons why the PR is not merged? |
@p-98 I have no idea, guessing this project was been deprecated with no announcements. and I'm gone for poor type checking from pug months ago 😉 |
As title, seems the
class
property alias was broken since^7.0.0
but works in^6.0.0
.It seems like the removal of alias
class -> className
in #62?src/visitors/Tag.js
Here's the sample:
It works when using
className
(REPL)And it broken when
class
but it should be work (REPL)Full log from my console
The text was updated successfully, but these errors were encountered: