Skip to content

Commit db1d92e

Browse files
authored
Added side callout CSS (#168)
* feat: Added side callout CSS * fix: Add default option to callout to be inline
1 parent 691d24c commit db1d92e

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

assets/css/v2/style.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ nav {
337337
--side-gutter-width
338338
);
339339
column-gap: var(--component-gap);
340+
align-items: start;
340341
}
341342
}
342343

@@ -788,6 +789,9 @@ h2 {
788789

789790
/* tables */
790791
table {
792+
position: relative;
793+
z-index: -1;
794+
791795
td {
792796
padding: var(--table-row-space-between) 0;
793797
}
@@ -882,6 +886,11 @@ blockquote p:last-child {
882886
margin: 0 auto;
883887
}
884888

889+
blockquote.side-callout {
890+
grid-column: 2 !important;
891+
grid-row: span 2;
892+
}
893+
885894
/* Tabs */
886895

887896
.tabs-container {

layouts/shortcodes/call-out.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
{{ $class := .Get 0 }}
2+
{{ $sideOption := "side-callout" }}
3+
{{ $inlineOption := "inline-callout" }}
4+
5+
<!-- Add default option for callouts that are "inline" if one is not provided -->
6+
{{ if and (not (strings.Contains $class $inlineOption)) (not (strings.Contains $class $sideOption)) }}
7+
{{ $class = printf "%s %s" $class $inlineOption }}
8+
{{ end }}
9+
110
<!-- Blockquote element with a class that is the first parameter passed to the shortcode -->
2-
<blockquote class="{{ .Get 0 }}">
11+
<blockquote class="{{ $class }}">
312
<div>
413
<!-- Check if the third parameter (icon class) is provided -->
514
{{ with .Get 2 }}

0 commit comments

Comments
 (0)