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

b-icon title support #5711

Closed
mariusa opened this issue Aug 30, 2020 · 0 comments · Fixed by #5724
Closed

b-icon title support #5711

mariusa opened this issue Aug 30, 2020 · 0 comments · Fixed by #5724

Comments

@mariusa
Copy link
Contributor

mariusa commented Aug 30, 2020

Is your feature request related to a problem? Please describe...

I'd like to set a title on / elements

Describe the solution you'd like

<b-icon-envelope :title="user_email"></b-icon-envelope>

Describe alternatives you've considered

wrapping in a parent element having a title set

Additional context

https://stackoverflow.com/questions/10643426/how-to-add-a-tooltip-to-an-svg-graphic

the SVG <title> element and the default browser rendering it conveys? (Note: this is not the same as the title attribute you can use on div/img/spans in html, it needs to be a child element named title)

It does work:

<svg viewBox="0 0 16 16" width="1em" height="1em" focusable="false" role="img" aria-label="envelope" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi-envelope b-icon bi">
    <title>Aaaa</title>
    <g><path fill-rule="evenodd" d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2zm13 2.383l-4.758 2.855L15 11.114v-5.73zm-.034 6.878L9.271 8.82 8 9.583 6.728 8.82l-5.694 3.44A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.739zM1 11.114l4.758-2.876L1 5.383v5.73z"></path></g>
</svg>
@jacobmllr95 jacobmllr95 added this to To do in v2.17.0 via automation Aug 31, 2020
v2.17.0 automation moved this from To do to Done Sep 3, 2020
jacobmllr95 added a commit that referenced this issue Sep 3, 2020
* update icon-base.js

* update package.json

* Add tests

* Improved default title handling

* Update icon-base.js

Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v2.17.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants