From 5bf1f640e8e07954573d13b17d00c48f5884d235 Mon Sep 17 00:00:00 2001 From: Hale Rankin Date: Thu, 28 Jan 2021 15:52:40 -0800 Subject: [PATCH] Notebook - text cell - minimum height fix (#14080) * Adding minimum height to text cell element so whether empty or occupied with a single line of content, the container is the same height. * Added styles to remove top padding/margin from first child element and set top-padding of container. * Switch top padding to px value * Removed line-height and min-height as these are no longer necessary to maintain text-cell height. --- .../contrib/notebook/browser/cellViews/media/markdown.css | 2 -- .../contrib/notebook/browser/cellViews/textCell.css | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/contrib/notebook/browser/cellViews/media/markdown.css b/src/sql/workbench/contrib/notebook/browser/cellViews/media/markdown.css index f908729309..c3f6219d56 100644 --- a/src/sql/workbench/contrib/notebook/browser/cellViews/media/markdown.css +++ b/src/sql/workbench/contrib/notebook/browser/cellViews/media/markdown.css @@ -5,8 +5,6 @@ .notebook-preview { font-size: 14px; - line-height: 22px; - min-height: 22px; word-wrap: break-word; } diff --git a/src/sql/workbench/contrib/notebook/browser/cellViews/textCell.css b/src/sql/workbench/contrib/notebook/browser/cellViews/textCell.css index fe2174d2ea..a61f28df51 100644 --- a/src/sql/workbench/contrib/notebook/browser/cellViews/textCell.css +++ b/src/sql/workbench/contrib/notebook/browser/cellViews/textCell.css @@ -9,6 +9,7 @@ text-cell-component { text-cell-component .notebook-text { display: flex; outline: none; + min-height: 50px; } text-cell-component code-component { flex-direction: column; @@ -20,6 +21,11 @@ text-cell-component .notebook-preview { user-select: none; width: 100%; outline: none; + padding-top: 14px; +} +text-cell-component .notebook-preview > *:first-child { + margin-top: 0; + padding-top: 0; } text-cell-component .show-markdown.show-preview code-component { width: 50%