diff --git a/packages/core/src/vivliostyle/vgen.ts b/packages/core/src/vivliostyle/vgen.ts index 1d23bf517..1c58acf4c 100644 --- a/packages/core/src/vivliostyle/vgen.ts +++ b/packages/core/src/vivliostyle/vgen.ts @@ -959,6 +959,14 @@ export class ViewFactory const pageVal: Css.Val = computedStyle["page"]; let pageType = pageVal && !Css.isDefaultingValue(pageVal) && pageVal.toString(); + if ( + !pageType && + !this.nodeContext.parent && + this.nodeContext.shadowContext + ) { + // Keep currentPageType for shadowContext (Fix for issue #1233) + pageType = this.styler.cascade.currentPageType; + } if (!pageType || pageType.toLowerCase() === "auto") { pageType = this.nodeContext.pageType; } else {