First, thank you @sliemeobn for creating ElementaryUI and ElementaryFlow. The framework is truly incredible already, and I'm excited to follow its development.
I’m working on a project using ElementaryUI and -Flow for its web front-end. I’m able to build and serve the web app, and the .styles defined in the code are loaded (a .background(.black) I defined shows up as --e-bg: black in the CSS inspector). But the styles are not actually applied, suggesting that whatever stylesheet defines ElementaryFlow’s CSS variables (such as --e-bg) is not loaded.
ElementaryFlow’s How to Use It explains that
The package contains a single, static CSS file that must be loaded for ElementaryFlow to work: css/elementary-flow.css. Make sure to bundle this file as part of your web project build.
So I imagine the issue is that I’m not bundling css/elementary-flow.css. So, how exactly should this file be bundled?
The Swiftle sample app bundles it by setting resolve.alias["ElementaryFlow"] to resolve(__dirname, ".build/checkouts/elementary-flow/css/elementary-flow.css"). So I added node:path as a dev dependency, followed the resolve+__dirname approach, rebuilt, and re-served, but no stylesheet.
WasmExample bundles the file by using explicit relative paths for resolve.alias["ElementaryFlow"] instead (in its case, "../../css/elementary-flow.css"), and I see that other ElementaryFlow-provided .build resources (namely .build/checkouts/elementary-ui/BrowserRuntime) are bundled in the starter project and in all sample apps via a different approach entirely (by adding them to the "dependencies" in package.json).
So, what is the right way to bundle the ElementaryFlow stylesheet? Thanks!
First, thank you @sliemeobn for creating ElementaryUI and ElementaryFlow. The framework is truly incredible already, and I'm excited to follow its development.
I’m working on a project using ElementaryUI and -Flow for its web front-end. I’m able to build and serve the web app, and the
.styles defined in the code are loaded (a.background(.black)I defined shows up as--e-bg: blackin the CSS inspector). But the styles are not actually applied, suggesting that whatever stylesheet defines ElementaryFlow’s CSS variables (such as--e-bg) is not loaded.ElementaryFlow’s How to Use It explains that
So I imagine the issue is that I’m not bundling css/elementary-flow.css. So, how exactly should this file be bundled?
The Swiftle sample app bundles it by setting
resolve.alias["ElementaryFlow"]toresolve(__dirname, ".build/checkouts/elementary-flow/css/elementary-flow.css"). So I addednode:pathas a dev dependency, followed theresolve+__dirnameapproach, rebuilt, and re-served, but no stylesheet.WasmExample bundles the file by using explicit relative paths for
resolve.alias["ElementaryFlow"]instead (in its case,"../../css/elementary-flow.css"), and I see that other ElementaryFlow-provided.buildresources (namely.build/checkouts/elementary-ui/BrowserRuntime) are bundled in the starter project and in all sample apps via a different approach entirely (by adding them to the"dependencies"inpackage.json).So, what is the right way to bundle the ElementaryFlow stylesheet? Thanks!