Skip to content

Commit 0457ced

Browse files
committed
fix: Admonition drop shadow setting will now apply to callouts (close #222)
1 parent 63d03fb commit 0457ced

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/assets/callout.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.callout:not(.admonition) {
2+
&.drop-shadow {
3+
box-shadow: 0 0.2rem 0.5rem var(--background-modifier-box-shadow);
4+
}
25
.no-title {
36
display: none;
47
}
5-
6-
}
8+
}

src/callout/manager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ export default class CalloutManager extends Component {
127127
titleContentEl.setText(admonition.title);
128128
}
129129
}
130+
if (this.plugin.data.dropShadow) {
131+
callout.addClass('drop-shadow')
132+
}
130133
}
131134
getComputedHeights(el: HTMLDivElement): Heights {
132135
if (this.heightMap.has(el)) {

0 commit comments

Comments
 (0)