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

LeptosOptions: provide the CSS path #3513

Open
jaskij opened this issue Jan 23, 2025 · 0 comments
Open

LeptosOptions: provide the CSS path #3513

jaskij opened this issue Jan 23, 2025 · 0 comments

Comments

@jaskij
Copy link

jaskij commented Jan 23, 2025

As in the title - it'd be great if LeptosOptions provided a function (or member?) with the path to the CSS file generated.

From what I can see, the generated CSS file is put in /pkg/{output_name}.css. It could be a simple helper function, currently I have:

fn css_path(leptos_options: &LeptosOptions) -> String {
    let mut path = String::with_capacity(200);
    path.push('/');
    path.push_str(&*leptos_options.site_pkg_dir);
    path.push('/');
    path.push_str(&*leptos_options.output_name);
    path.push_str(".css");

    path
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants