Hi Nicolas. No, that’s the intended behavior for a hidden cell. A hidden cell suppresses its implicit display, which means that for a Markdown or HTML cell, the resulting DOM content will not be inserted into the DOM.
We currently show <empty> in cells that display nothing, or that only display a style or link element (which are common but zero-height elements). (Note: I just changed the latter to <style> and <link> as appropriate, so if you toggle the hidden flag on the cell you will see it toggle between <empty> and <style> as intended.) In the future, these placeholders will go away in read-only mode and the cell will become completely invisible to the reader, but the content will still be inserted into the DOM. In edit mode (and in read-only mode for now), we need to display something even when a cell doesn’t display anything itself so that you can click on the cell to edit it, select it, etc.
If you want to suppress the <empty> (or <style> etc.), you can wrap the style or link element in a <div> like so:
<div>
<style>
body {
background: cyan;
}
</style>
</div>
Similarly, in your case you can use a Markdown cell to wrap the imported style element in a <p> element:
${style}
Alternatively, you can hide your style or link element in another cell that is already displaying something, such as the first (title) cell in your notebook.
Hidden Markdown and HTML cells aren’t very common, but they can be used to effectively disable a cell temporarily if you don’t want them to display. Also, in the near future, we’ll likely let you set the name (a.k.a. output) of Markdown and HTML cells, as you can currently do in the old editor. This lets you define some chunk of Markdown or HTML content, and then reference this content as a variable in another cell. See this earlier thread for related discussion.