StyleSheet (@NotNull Editor editor, boolean useTipsKit) { EditorColorsScheme colorsScheme = editor.getColorsScheme(); Color linkColor = colorsScheme.getColor(DefaultLanguageHighlighterColors.DOC_COMMENT_LINK); if (linkColor == null) linkColor = getTextColor(colorsScheme); String linkColorHex = ColorUtil.toHex(linkColor); if (useTipsKit || !Objects.equals(linkColorHex, ourCachedStyleSheetLinkColor)) { String editorFontNamePlaceHolder = EditorCssFontResolver.EDITOR_FONT_NAME_NO_LIGATURES_PLACEHOLDER; @Language("CSS") String input = "body {overflow-wrap: anywhere}" + // supported by JetBrains Runtime "code {font-family: \"" + editorFontNamePlaceHolder + "\"}" + "pre {font-family: \"" + editorFontNamePlaceHolder + "\";" + "white-space: pre-wrap}" + // supported by JetBrains Runtime "h1, h2, h3, h4, h5, h6 {margin-top: 0; padding-top: 1}" + "a {color: #" + linkColorHex + "; text-decoration: none}" + "p {padding: 7 0 2 0}" + "ol {padding: 0 20 0 0}" + "ul {padding: 0 20 0 0}" + "li {padding: 1 0 2 0}" + "li p {padding-top: 0}" + "table p {padding-bottom: 0}" + "th {text-align: left}" + "td {padding: 2 0 2 0}" + "td p {padding-top: 0}" + ".sections {border-spacing: 0}" + ".section {padding-right: 5; white-space: nowrap}" + ".content {padding: 2 0 2 0}" + (useTipsKit ? createAdditionalStylesForTips(editor) : ""); StyleSheet result = StyleSheetUtil.loadStyleSheet(input); if (!useTipsKit) { ourCachedStyleSheet = result; ourCachedStyleSheetLinkColor = linkColorHex; } return result; } return ourCachedStyleSheet; }