Skip to content

Commit 242f2d3

Browse files
Feat: Callout adjustment to hide table-header
Adding `|n-th` or `|no-table-header` metadata/alias to a callout will hide the header row of a table.
1 parent 9f773a3 commit 242f2d3

File tree

3 files changed

+260
-240
lines changed

3 files changed

+260
-240
lines changed

Diff for: content/.obsidian/snippets/mmw-callout-adjustments.css

+10
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,13 @@
205205
--table-text-size: var(--font-smallest);
206206
font-size: var(--font-text-size);
207207
}
208+
209+
.callout:is([data-callout-metadata~=n-th],
210+
[data-callout-metadata~=no-table-header]) > .callout-content table {
211+
margin-bottom: 5px;
212+
}
213+
.callout:is([data-callout-metadata~=n-th],
214+
[data-callout-metadata~=no-table-header]) > .callout-content table thead, .callout:is([data-callout-metadata~=n-th],
215+
[data-callout-metadata~=no-table-header]) > .callout-content table th {
216+
display: none;
217+
}

Diff for: content/contributing/custom-formatting-features.md

+31-30
Original file line numberDiff line numberDiff line change
@@ -53,48 +53,49 @@ MMW borrows a large number of [Callout Adjustments](https://publish.obsidian.md/
5353

5454
### Callout Titles
5555

56-
|Abbr.|Full Title|Description|
57-
|---|---|---|
58-
|`no-t`|`no-title`|Hides callout title|
59-
|`s-t`|`show-title`|Show callout title|
60-
|`ttl-c`|`title-center`|Center callout title text|
61-
|`no-i`|`no-icon`|Hide callout icon|
62-
|`subt`|`subtitle`|Style words in italic (`* *`, `_ _`) as subtitles|
56+
| Abbr. | Full Title | Description |
57+
| ------- | -------------- | ------------------------------------------------- |
58+
| `no-t` | `no-title` | Hides callout title |
59+
| `s-t` | `show-title` | Show callout title |
60+
| `ttl-c` | `title-center` | Center callout title text |
61+
| `no-i` | `no-icon` | Hide callout icon |
62+
| `subt` | `subtitle` | Style words in italic (`* *`, `_ _`) as subtitles |
6363

6464
### Callout Text
6565

66-
|Abbr.|Full Title|Description|
67-
|---|---|---|
68-
|`txt-c`|`text-center`|Center callout text|
69-
|`txt-r`|`txt-right`|Right align callout text|
70-
|`txt-l`|`txt-left`|Left align callout text|
71-
|`txt-s`|`text-small`|Shrink callout text size|
66+
| Abbr. | Full Title | Description |
67+
| ------- | ------------- | ------------------------ |
68+
| `txt-c` | `text-center` | Center callout text |
69+
| `txt-r` | `txt-right` | Right align callout text |
70+
| `txt-l` | `txt-left` | Left align callout text |
71+
| `txt-s` | `text-small` | Shrink callout text size |
7272

7373
### Callout Styling
7474

75-
|Abbr.|Full Title|Description|
76-
|---|---|---|
77-
||`embed`|Remove callout padding to expand embed|
78-
||`clean`|Remove callout Styling|
79-
||`collapse`|Remove all padding and margins for ultra compact look|
80-
|`nbrd`|`no-border`|Borderless callout|
81-
||`clear`|Move any other floating elements near to under this callout|
75+
| Abbr. | Full Title | Description |
76+
| ------ | ----------------- | ----------------------------------------------------------- |
77+
| | `embed` | Remove callout padding to expand embed |
78+
| | `clean` | Remove callout Styling |
79+
| | `collapse` | Remove all padding and margins for ultra compact look |
80+
| `nbrd` | `no-border` | Borderless callout |
81+
| | `clear` | Move any other floating elements near to under this callout |
82+
| `n-th` | `no-table-header` | Hides table header in callouts |
8283

8384
### Callout Content Padding
8485

85-
|Attribute|Abbr|Callout Padding Sizing|
86-
|---|---|:-:|
87-
|`content-padding-small`|`c-p-sm`|6px|
88-
|`content-padding-medium`|`c-p-med`|12px|
89-
|`content-padding-large`|`c-p-lg`|24px|
86+
| Attribute | Abbr | Callout Padding Sizing |
87+
| ------------------------ | --------- | :--------------------: |
88+
| `content-padding-small` | `c-p-sm` | 6px |
89+
| `content-padding-medium` | `c-p-med` | 12px |
90+
| `content-padding-large` | `c-p-lg` | 24px |
9091

9192
### Callout Positioning
9293

93-
|Attribute|Description|
94-
|---|---|
95-
|`left`|Float callout to the left|
96-
|`right`|Float callout to the right|
97-
|`center`|Center the callout|
94+
| Attribute | Description |
95+
| --------- | -------------------------- |
96+
| `left` | Float callout to the left |
97+
| `right` | Float callout to the right |
98+
| `center` | Center the callout |
9899

99100
### Callout Sizing
100101

0 commit comments

Comments
 (0)