Skip to content

Commit

Permalink
fix #1428
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Aug 2, 2024
1 parent 019bca4 commit e34b85c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/css/app/foundation/_wordpress/_align/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@
}

.alignwide {
max-width: var(--wp--style--global--wide-size);
max-width: var(--wp--custom--content-wide-width);
}
6 changes: 3 additions & 3 deletions src/css/app/layout/_body/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

// Blank / One column full
[data-is-full-template="true"] {
--wp--style--global--content-size: none;
--wp--style--global--wide-size: none;
--wp--custom--content-width: none;
--wp--custom--content-wide-width: none;
}

// One column slim / Blank slim
[data-has-sidebar="false"][data-is-slim-width="true"] {
.l-contents__inner {
--wp--style--global--content-size: var(--wp--custom--slim-width);
--wp--custom--content-width: var(--wp--custom--slim-width);
}
}
4 changes: 2 additions & 2 deletions src/css/app/layout/_contents/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

:where(.l-contents__container > *) {
margin-inline: auto;
max-width: var(--wp--style--global--content-size);
max-width: var(--wp--custom--content-width);
}

:where(.l-contents__main > *) {
margin-inline: auto;
max-width: var(--wp--style--global--content-size);
max-width: var(--wp--custom--content-width);
}

.l-contents {
Expand Down
6 changes: 3 additions & 3 deletions src/css/app/object/component/_entry/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

:where(.c-entry > *) {
margin-inline: auto;
max-width: var(--wp--style--global--content-size);
max-width: var(--wp--custom--content-width);
}

:where(.c-entry__body > *) {
margin-inline: auto;
max-width: var(--wp--style--global--content-size);
max-width: var(--wp--custom--content-width);
}

:where(.c-entry__content > :not(.alignleft):not(.alignright):not(.alignfull)) {
max-width: var(--wp--style--global--content-size);
max-width: var(--wp--custom--content-width);
}

.c-entry {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
// One column full
[data-has-sidebar="false"][data-is-full-template="true"] .l-contents__main {
.p-section-front-page-content {
--wp--style--global--content-size: var(--wp--custom--content-width);
--wp--style--global--wide-size: var(--wp--custom--content-wide-width);
// When [data-is-full-template="true"], the width specification is disabled and should be re-specified here.
--wp--custom--content-width: var(--_global--container-max-width);
--wp--custom--content-wide-width: calc(var(--_global--container-max-width) + 240px);
}
}
4 changes: 2 additions & 2 deletions src/css/block-editor/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ html :where(.editor-styles-wrapper) {
.l-body--one-column-slim,
.l-body--blank-slim {
.editor-styles-wrapper {
--wp--custom--content-max-width: var(--wp--custom--slim-width);
--wp--custom--content-width: var(--wp--custom--slim-width);
}
}

// @see src/css/layout/body/_body.scss
.l-body--right-sidebar,
.l-body--left-sidebar {
.editor-styles-wrapper {
--wp--custom--content-max-width: calc(var(--_global--container-max-width) - 336px);
--wp--custom--content-width: calc(var(--_global--container-max-width) - 336px);
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/css/custom-widgets/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

[data-has-sidebar="false"] {
[data-is-content-widget-area="true"] {
--wp--style--global--content-size: none;
--wp--custom--content-width: none;
--wp--custom--content-wide-width: none;

.alignfull > .c-container {
padding-right: 0;
Expand Down
5 changes: 2 additions & 3 deletions theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,8 @@
},
"custom": {
"slim-width": "46rem",
"content-max-width": "var(--_global--container-max-width)",
"content-width": "var(--wp--custom--content-max-width)",
"content-wide-width": "calc(var(--wp--custom--content-width) + 240px)",
"content-width": "var(--_global--container-max-width)",
"content-wide-width": "calc(var(--_global--container-max-width) + 240px)",
"has-sidebar-main-basis": "var(--wp--custom--slim-width)",
"has-sidebar-sidebar-basis": "336px"
},
Expand Down

0 comments on commit e34b85c

Please sign in to comment.