diff --git a/ReactNativeClient/lib/joplin-renderer/noteStyle.js b/ReactNativeClient/lib/joplin-renderer/noteStyle.js index e71b1e453..3d938c9ac 100644 --- a/ReactNativeClient/lib/joplin-renderer/noteStyle.js +++ b/ReactNativeClient/lib/joplin-renderer/noteStyle.js @@ -52,23 +52,20 @@ module.exports = function(style, options) { } /* Remove top padding and margin from first child so that top of rendered text is aligned to top of text editor text */ - /* Disabled, because it also applies to non-direct descendants of #rendered-md and also not a very elegant solution */ - - /* - #rendered-md h1:first-child, - #rendered-md h2:first-child, - #rendered-md h3:first-child, - #rendered-md h4:first-child, - #rendered-md ul:first-child, - #rendered-md ol:first-child, - #rendered-md table:first-child, - #rendered-md blockquote:first-child, - #rendered-md img:first-child, - #rendered-md p:first-child { + + #rendered-md > h1:first-child, + #rendered-md > h2:first-child, + #rendered-md > h3:first-child, + #rendered-md > h4:first-child, + #rendered-md > ul:first-child, + #rendered-md > ol:first-child, + #rendered-md > table:first-child, + #rendered-md > blockquote:first-child, + #rendered-md > img:first-child, + #rendered-md > p:first-child { margin-top: 0; padding-top: 0; } - */ p, h1, h2, h3, h4, h5, h6, ul, table { margin-top: .6em;