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

Allow arbitrary attribute syntax in class and ID names #128

Closed
lambda-fairy opened this issue May 13, 2018 · 2 comments
Closed

Allow arbitrary attribute syntax in class and ID names #128

lambda-fairy opened this issue May 13, 2018 · 2 comments

Comments

@lambda-fairy
Copy link
Owner

Currently, all kinds of syntax is allowed in attribute values:

a href="pinkie.html" { /* ... */ }
a href=(pinkie_url) { /* ... */ }
a href={ (PINKIE_ROOT) "/pinkie.html" } { /* ... */ }
a href=@if pony == Pony::Pinkie { "pinkie.html" } @else { "maud.html" } { /* ... */ }

It would be nice if this syntax is allowed in class and ID shorthand as well:

p."pinkie-123" { /* ... */ }
p.(pinkie_class) { /* ... */ }
p.{ (CLASS_PREFIX) "-pinkie" } { /* ... */ }
p.@if pony == Pony::Pinkie { "pinkie" } @else { "maud" } { /* ... */ }

This would neatly cover the use cases in #45, #98, and #105.

@eedahl
Copy link

eedahl commented May 22, 2018

I foolishly opened a duplicate of this issue #130. I believe it offers a compelling use-case where what seems to be the current short-hand is somewhat unfeasible.

@lambda-fairy
Copy link
Owner Author

I've implemented this on a local branch. I'll push it up when I get WiFi on my laptop.

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

No branches or pull requests

2 participants