Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原因と修正の説明
原因: theme-styles.styl:76-81 の .article-entry p ルールです。
.article-entry p {
color: #424242;
font-size: 1.2em;
line-height: 1.75em !important;
}
Mermaid v10以降は、ノードラベルをSVG内の 要素にHTML(
タグ等)として描画します。この
タグに対して .article-entry p
のセレクタがマッチし、color: #424242(ほぼ黒色)が直接適用されます。
CSSの仕様では、直接マッチするルールは親要素から継承された値よりも常に優先されるため、mermaidの style TenantDB fill:#2e7d32,color:#fff
で白文字を指定しても、.article-entry p { color: #424242 } に上書きされていました。font-size: 1.2em
もダイアグラム内のテキストサイズに影響していたはずです。
修正: pre.mermaid 内の p, span, li 要素に対して、color や font-size を inherit !important
に設定し、mermaidが設定する値がそのまま使われるようにしました。