Contextual Typography
approvedby mgmeyers
Add a data-tag-name attribute to all top-level divs in preview mode containing the child's tag name, allowing contextual typography styling.
★ 193 stars↓ 107,099 downloadsUpdated 2y agoGPL-3.0
obsidian-contextual-typography
This plugin adds a data-tag-name attribute to all top-level preview divs, allowing contextual typography. Note: this plugin does not add any styles, but enables contextual styling.
This is specifically inspired by http://matejlatin.github.io/Gutenberg/
Sample
.markdown-preview-view div[data-tag-name="h1"] + div > h2 {
margin-top: 1.8888888889rem;
}
Before:
After:

For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.