adjust css to pin toolbar (#11894)

This commit is contained in:
Laura Jiang
2020-08-20 17:11:53 -07:00
committed by GitHub
parent b2a1738836
commit 84d21b1e76
4 changed files with 9 additions and 2 deletions

View File

@@ -183,7 +183,12 @@ export function registerNotebookThemes(overrideEditorThemeSetting: boolean, conf
// Markdown editor toolbar
const toolbarBackgroundColor = theme.getColor(toolbarBackground);
if (toolbarBackgroundColor) {
collector.addRule(`markdown-toolbar-component { background: ${toolbarBackgroundColor};}`);
collector.addRule(`markdown-toolbar-component {
background: ${toolbarBackgroundColor};
position: sticky;
top: -16px;
z-index: 1;
}`);
}
const toolbarIconColor = theme.getColor(toolbarIcon);
if (toolbarIconColor) {