|
@@ -797,6 +797,15 @@ blockquote {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/** === Helper Functions === */
|
|
|
|
+/**
|
|
|
|
+ Given a string, $alignment, returns the nested FSE block selectors
|
|
|
|
+ required for Full Site Editing to look correct. If $alignment is given,
|
|
|
|
+ we use it to target wp-blocks with a matching data-align attribute.
|
|
|
|
+ If no alignment is given, we target the base wp-block class. In both
|
|
|
|
+ of these scenarios, we target top level blocks, and any top level blocks
|
|
|
|
+ inside one of the FSE template part blocks.
|
|
|
|
+ */
|
|
/** === Editor Frame === */
|
|
/** === Editor Frame === */
|
|
body {
|
|
body {
|
|
font-weight: 300;
|
|
font-weight: 300;
|
|
@@ -807,7 +816,9 @@ body .wp-block[data-align="full"] {
|
|
}
|
|
}
|
|
|
|
|
|
@media only screen and (min-width: 600px) {
|
|
@media only screen and (min-width: 600px) {
|
|
- body .wp-block[data-align="full"] {
|
|
|
|
|
|
+
|
|
|
|
+ body .wp-block[data-align="full"],
|
|
|
|
+ body .wp-block[data-type="a8c/post-content"] .wp-block[data-align="full"] {
|
|
width: calc( 100% + 90px);
|
|
width: calc( 100% + 90px);
|
|
max-width: calc( 100% + 90px);
|
|
max-width: calc( 100% + 90px);
|
|
}
|
|
}
|
|
@@ -818,39 +829,58 @@ body .wp-block[data-align="full"] {
|
|
max-width: 80%;
|
|
max-width: 80%;
|
|
margin: 0 10%;
|
|
margin: 0 10%;
|
|
}
|
|
}
|
|
- body .wp-block[data-align="wide"] {
|
|
|
|
|
|
+
|
|
|
|
+ body .wp-block[data-align="wide"],
|
|
|
|
+ body .wp-block[data-type="a8c/post-content"] .wp-block[data-align="wide"] {
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
- body .wp-block[data-align="full"] {
|
|
|
|
|
|
+
|
|
|
|
+ body .wp-block[data-align="full"],
|
|
|
|
+ body .wp-block[data-type="a8c/post-content"] .wp-block[data-align="full"] {
|
|
position: relative;
|
|
position: relative;
|
|
left: calc( -12.5% - 14px);
|
|
left: calc( -12.5% - 14px);
|
|
width: calc( 125% + 116px);
|
|
width: calc( 125% + 116px);
|
|
max-width: calc( 125% + 115px);
|
|
max-width: calc( 125% + 115px);
|
|
}
|
|
}
|
|
- body .wp-block[data-align="right"] {
|
|
|
|
|
|
+
|
|
|
|
+ body .wp-block[data-align="right"],
|
|
|
|
+ body .wp-block[data-type="a8c/post-content"] .wp-block[data-align="right"] {
|
|
max-width: 125%;
|
|
max-width: 125%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/** === Content Width === */
|
|
/** === Content Width === */
|
|
-.wp-block {
|
|
|
|
|
|
+
|
|
|
|
+.wp-block,
|
|
|
|
+.wp-block[data-type="a8c/post-content"] .wp-block {
|
|
width: calc(100vw - (2 * 1rem));
|
|
width: calc(100vw - (2 * 1rem));
|
|
max-width: 100%;
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
|
|
@media only screen and (min-width: 768px) {
|
|
@media only screen and (min-width: 768px) {
|
|
- .wp-block {
|
|
|
|
|
|
+
|
|
|
|
+ .wp-block,
|
|
|
|
+ .wp-block[data-type="a8c/post-content"] .wp-block {
|
|
width: calc(8 * (100vw / 12));
|
|
width: calc(8 * (100vw / 12));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@media only screen and (min-width: 1168px) {
|
|
@media only screen and (min-width: 1168px) {
|
|
- .wp-block {
|
|
|
|
|
|
+
|
|
|
|
+ .wp-block,
|
|
|
|
+ .wp-block[data-type="a8c/post-content"] .wp-block {
|
|
width: calc(6 * (100vw / 12 ));
|
|
width: calc(6 * (100vw / 12 ));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-.wp-block .wp-block {
|
|
|
|
|
|
+
|
|
|
|
+.wp-block .wp-block,
|
|
|
|
+.wp-block[data-type="a8c/post-content"] .wp-block .wp-block {
|
|
|
|
+ width: 100%;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/** === FSE Template Part Blocks === */
|
|
|
|
+.wp-block[data-type="a8c/post-content"] {
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
|