colab not employing css

Viewed 1117

When running jupyter on my own machine, the code below (first cell) affects all subsequent cells that reference the css rule, i.e., it works as expected. When I run it in colab, it has no effect. Is there an equivalent form that will work with both local and colab jupyter environments?

%%html
<style>
.h1_cell {
    box-sizing: border-box;
    padding-top:5px;
    padding-bottom:5px;
    font-family: "Times New Roman", "Georgia", "Serif";
    font-size: 125%;
    line-height: 22px; /* 5px +12px + 5px */
    text-indent: 15px;
    background-color: #fbfbea; //#e6e6e6;
    padding: 10px;
}
</style>

Subsequent markdown cells have a header of

<div class=h1_cell>
1 Answers

Each Colab output is rendered in a distinct iframe sandbox. So, any style changes will only apply to the output of the cell where the customization is executed.

Related