Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slide size defined in :root selector does not reflect to the theme instance #244

Closed
yhatt opened this issue May 16, 2020 · 0 comments · Fixed by #246
Closed

Slide size defined in :root selector does not reflect to the theme instance #244

yhatt opened this issue May 16, 2020 · 0 comments · Fixed by #246
Labels
bug Something isn't working

Comments

@yhatt
Copy link
Member

yhatt commented May 16, 2020

Marpit document is explaining how to define slide size in :root selector through width and height declarations, but the generated Theme instance won't reflect the slide size.

Marpit.themeSet.add(`
/* @theme abc */
:root {
width: 123px;
height: 456px;
}
`)
// Theme {
//   name: 'abc',
//   css: '\n/* @theme abc */\n:root {\nwidth: 123px;\nheight: 456px;\n}\n',
//   meta: { theme: 'abc' },
//   importRules: [],
//   width: undefined,
//   height: undefined
// }

width and height must reflect the size defined in :root selector.

:root selector support in v1.6.0 was only added to themeSet.pack() to transform theme CSS into slide-specific style. Probably we have to alias while registering theme instead of while packaging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant