-
Notifications
You must be signed in to change notification settings - Fork 26
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
Remove class_inactive option #14
base: master
Are you sure you want to change the base?
Conversation
Hi and thanks a lot for all the work. |
@danhper wouldn't it make sense to just have Examplesactive_link(conn, "Home", to: "/")
# <a class="active" href="/">Home</a>
active_link(conn, "Home", to: "/", wrap_tag: :li)
# <li class="active">
# <a href="/">Home</a>
# </li>
active_link(conn, "Home", to: "/", wrap_tag: :li, class_active: "enabled")
# <li class="enabled">
# <a href="/">Home</a>
# </li> The active_link(conn, "Home",
to: "/",
class: "nav-link",
wrap_tag: :li,
wrap_tag_opts: [class: "nav-item"]
)
# <li class="active nav-item">
# <a class="nav-link" href="/">Home</a>
# </li>
active_link(conn, "Home",
to: "/",
class: "nav-link",
class_active: "enabled",
wrap_tag: :li,
wrap_tag_opts: [class: "nav-item"]
)
# <li class="enabled nav-item">
# <a class="nav-link" href="/">Home</a>
# </li> |
@danhper please let me know what you think about my comment above. |
@sn3p Thanks for the proposal and sorry for the delay.
I think this is indeed simpler and should be enough to support any CSS framework so let's go with that. Thanks again! |
What is the state of this PR? does it need some job tbd ? |
closes #10
This removes
class_inactive
in favour ofclass
as discussed here.This doesn't introduce any new options like the proposed
wrap_*
classes, because I found there already is an undocumentedwrap_tag_opts
option which kinda solves the issue.@danhper what do you think?
I'm willing to take this further, but before I do I like to know your opinion on this.
:class_inactive
in favour of:class
wrap_tag_opts
option in the docsactive
class towrap_tag
or link (not both) ?Examples