Skip to content

Commit

Permalink
fix: 🚑️ Fix two issues introduced by breadcrumbs changes
Browse files Browse the repository at this point in the history
The breadcrumbs change added a child element to the `wp-blocks` container. In it's grid template style rule, we only accounted for three children, not four. This change fixes that, and adjusts the breadcrumbs parent element from `div` to `section` in the templates
  • Loading branch information
knice committed Apr 12, 2024
1 parent 8478f03 commit c311b4f
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 18 deletions.
4 changes: 4 additions & 0 deletions src/scss/base/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ body {
flex: 1 0 auto;
display: grid;
grid-template-rows: auto 1fr auto;

&:has(.breadcrumbs-region) {
grid-template-rows: auto auto 1fr auto;
}
}

.editor-styles-wrapper {
Expand Down
4 changes: 2 additions & 2 deletions templates/404.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"ucsc-2022","tagName":"header","className":"header-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","className":"breadcrumbs-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","tagName":"section","className":"breadcrumbs-region"} /-->

<!-- wp:group {"tagName":"main","className":"content-region","layout":{"inherit":true}} -->
<main class="wp-block-group content-region">
Expand Down Expand Up @@ -27,4 +27,4 @@ <h1 class="entry-title">
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
4 changes: 2 additions & 2 deletions templates/archive.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"ucsc-2022","tagName":"header","className":"header-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","className":"breadcrumbs-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","tagName":"section","className":"breadcrumbs-region"} /-->

<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"var:preset|spacing|50"}}},"className":"content-region","layout":{"inherit":true}} -->
<main class="wp-block-group content-region" style="margin-top:var(--wp--preset--spacing--50)">
Expand All @@ -11,4 +11,4 @@
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
4 changes: 2 additions & 2 deletions templates/category.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"ucsc-2022","tagName":"header","className":"header-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","className":"breadcrumbs-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","tagName":"section","className":"breadcrumbs-region"} /-->

<!-- wp:group {"tagName":"main","className":"content-region","layout":{"inherit":true,"type":"constrained"}} -->
<main class="wp-block-group content-region">
Expand All @@ -23,4 +23,4 @@
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
4 changes: 2 additions & 2 deletions templates/home.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"ucsc-2022","tagName":"header","className":"header-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","className":"breadcrumbs-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","tagName":"section","className":"breadcrumbs-region"} /-->

<!-- wp:group {"tagName":"main","className":"content-region","layout":{"inherit":true,"type":"constrained"}} -->
<main class="wp-block-group content-region">
Expand Down Expand Up @@ -28,4 +28,4 @@
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- wp:template-part {"slug":"header","theme":"ucsc-2022","tagName":"header","className":"header-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","className":"breadcrumbs-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","tagName":"section","className":"breadcrumbs-region"} /-->

<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"var:preset|spacing|50"}}},"className":"content-region"} -->
<main class="wp-block-group content-region" style="margin-top:var(--wp--preset--spacing--50)">
<!-- wp:post-content {"layout":{"type":"constrained"}} /-->
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
4 changes: 2 additions & 2 deletions templates/page-no-title.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"ucsc-2022","tagName":"header","className":"header-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","className":"breadcrumbs-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","tagName":"section","className":"breadcrumbs-region"} /-->

<!-- wp:group {"tagName":"main", "className":"content-region"} -->
<main class="wp-block-group content-region">
Expand All @@ -9,4 +9,4 @@
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
4 changes: 2 additions & 2 deletions templates/page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"ucsc-2022","tagName":"header","className":"header-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","className":"breadcrumbs-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","tagName":"section","className":"breadcrumbs-region"} /-->

<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"var:preset|spacing|40"}}},"className":"content-region"} -->
<main class="wp-block-group content-region" style="margin-top:var(--wp--preset--spacing--40)">
Expand All @@ -15,4 +15,4 @@
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
4 changes: 2 additions & 2 deletions templates/search.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"ucsc-2022","tagName":"header","className":"header-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","className":"breadcrumbs-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","tagName":"section","className":"breadcrumbs-region"} /-->

<!-- wp:group {"tagName":"main","className":"content-region"} -->
<main class="wp-block-group content-region">
Expand All @@ -17,4 +17,4 @@
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
4 changes: 2 additions & 2 deletions templates/single.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"ucsc-2022","tagName":"header","className":"header-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","className":"breadcrumbs-region"} /-->
<!-- wp:template-part {"slug":"breadcrumbs","theme":"ucsc-2022","tagName":"section","className":"breadcrumbs-region"} /-->

<!-- wp:group {"tagName":"main","className":"content-region","layout":{"type":"default"}} -->
<main class="wp-block-group content-region">
Expand Down Expand Up @@ -67,4 +67,4 @@
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->
<!-- wp:template-part {"slug":"footer","theme":"ucsc-2022","tagName":"footer","className":"footer-region"} /-->

0 comments on commit c311b4f

Please sign in to comment.