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

<kbd> tag does not render in notebook #4374

Closed
JarnoRFB opened this issue Apr 12, 2018 · 7 comments · Fixed by #6025
Closed

<kbd> tag does not render in notebook #4374

JarnoRFB opened this issue Apr 12, 2018 · 7 comments · Fixed by #6025
Labels
good first issue pkg:rendermime status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. tag:Design and UX
Milestone

Comments

@JarnoRFB
Copy link

Using <kbd></kbd> in Jupyter notebook renders to a keyboard key markup like Ctrl. In the Jupyter lab notebook, nothing really happens. Could be related to #1812 .

@jasongrout
Copy link
Contributor

Fixing this (and other tags mentioned in #1812 such as sup/sub, colspan/rowspan) should be very straightforward, so tagging this as a good first issue. These tags just need to be added to the security whitelist:

.concat('h1', 'h2', 'img', 'span', 'audio', 'video', 'del'),

Here is another PR that did exactly this for the del tag: #3771

PRs adding kbd and the other tags above to the whitelist are more than welcome!

@reevejd
Copy link
Member

reevejd commented May 22, 2018

I've opened a PR here: #4618

@jasongrout
Copy link
Contributor

jasongrout commented May 23, 2018

Fixed by #4618.

@jasongrout jasongrout added this to the Beta 3 milestone May 23, 2018
@domoritz
Copy link
Member

It looks like we can use kbd now but the default style is not great. Could you add some CSS to make it look more like a keyboard button?

@ian-r-rose
Copy link
Member

Nice idea. I'm going to reopen this as a good first issue. There is some sample <kbd> CSS here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd , which somebody could use as inspiration (though I personally think the dropshadows are a bit much in that example).

A new jp-RenderedHTML kbd rule would be added here:

@bollwyvl
Copy link
Contributor

bollwyvl commented Feb 22, 2019 via email

domoritz added a commit to domoritz/jupyterlab that referenced this issue Feb 22, 2019
@domoritz
Copy link
Member

I sent a PR at #6025.

ian-r-rose pushed a commit that referenced this issue Feb 22, 2019
* Add kbd style

Fixes #4374

* Update index.css

* Update index.css

* Lint fix.
gnestor pushed a commit to gnestor/jupyterlab that referenced this issue Mar 12, 2019
* Add kbd style

Fixes jupyterlab#4374

* Update index.css

* Update index.css

* Lint fix.
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Aug 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue pkg:rendermime status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. tag:Design and UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants