Skip to content

Commit c4d5d8c

Browse files
committed
update figure structure
1 parent f595568 commit c4d5d8c

File tree

4 files changed

+32
-6
lines changed

4 files changed

+32
-6
lines changed

_includes/figure.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<figure class="wp-block-image aligncenter size-medium">
1+
<figure class="document-figure aligncenter">
22
<img decoding="async" src="{{ site.url }}{{ include.url }}" alt="{{ include.alt }}" style="{{ include.style }}" />
33
{%- if include.description -%}
4-
<figcaption class="wp-element-caption">{{ include.description }}</figcaption>
4+
<figcaption>{{ include.description }}</figcaption>
55
{%- endif -%}
66
</figure>

_sass/common.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@
9898
}
9999
}
100100

101+
.aligncenter {
102+
clear: both
103+
}
104+
101105
.separator {
102106
white-space: pre-wrap
103107
}

_sass/legacy1.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,10 +776,6 @@ ul {
776776
display: none
777777
}
778778

779-
.aligncenter {
780-
clear: both
781-
}
782-
783779
.items-justified-left {
784780
justify-content: flex-start
785781
}

_sass/structure.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,32 @@ body {
136136
}
137137
}
138138

139+
.document-figure {
140+
141+
display: table;
142+
143+
&.aligncenter {
144+
text-align: center;
145+
}
146+
147+
img {
148+
box-sizing: border-box;
149+
height: auto;
150+
max-width: 100%;
151+
vertical-align: bottom;
152+
}
153+
154+
figcaption {
155+
caption-side: bottom;
156+
display: table-caption;
157+
color: #555;
158+
font-size: 13px;
159+
text-align: center;
160+
margin-bottom: 1em;
161+
margin-top: 0.5em;
162+
}
163+
}
164+
139165
/* overrides for content types */
140166

141167
.post {

0 commit comments

Comments
 (0)