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

Do not generate attributes for HTML tags if the values are nil #73

Closed
msaraiva opened this issue Apr 18, 2020 · 1 comment
Closed

Do not generate attributes for HTML tags if the values are nil #73

msaraiva opened this issue Apr 18, 2020 · 1 comment
Milestone

Comments

@msaraiva
Copy link
Member

It would be nice to be able to only set an attribute if the
property is non empty. This is particularly interesting for non
required properties. For example, if no class attribute is passed,
it still sets class="".

We do this already for boolean attributes. We should extend this behaviour when working with regular HTML tags as none of them accepts nil anyway.

paultannenbaum added a commit to paultannenbaum/surface that referenced this issue Apr 21, 2020
paultannenbaum added a commit to paultannenbaum/surface that referenced this issue Apr 21, 2020
paultannenbaum added a commit to paultannenbaum/surface that referenced this issue Apr 29, 2020
paultannenbaum added a commit to paultannenbaum/surface that referenced this issue Apr 29, 2020
…s if the values are `nil`"

This reverts commit a2f51e9.
paultannenbaum added a commit to paultannenbaum/surface that referenced this issue May 4, 2020
paultannenbaum added a commit to paultannenbaum/surface that referenced this issue May 4, 2020
…s if the values are `nil`"

This reverts commit a2f51e9.
@msaraiva msaraiva added this to the v0.1.0 milestone Aug 10, 2020
@msaraiva
Copy link
Member Author

Resolved in #115

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

1 participant