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

load stylesheet and javascript script from remote location #151

Conversation

FabienArcellier
Copy link
Collaborator

initial_state = ss.init_state({
    "my_app": {
        "title": "My App"
    },
})

initial_state.import_stylesheet("reset-css", "https://cdn.jsdelivr.net/npm/[email protected]/reset.min.css")
initial_state.import_stylesheet("theme", "/static/main.css")
initial_state.import_script('tailwind', "https://cdn.tailwindcss.com")

@FabienArcellier FabienArcellier force-pushed the 4-load-stylesheet-and-javascript-script-from-remote-location branch from 7463e57 to eaf3071 Compare October 13, 2023 03:09
* docs: add the chapter in the documentation
@ramedina86 ramedina86 merged commit 54e51ac into writer:dev Oct 15, 2023
@chrda81
Copy link

chrda81 commented Mar 14, 2024

Hi @FabienArcellier,

could you please share your theming stylesheet from line initial_state.import_stylesheet("theme", "/static/main.css")? I'm trying to get a dark theme for the application but had no luck yet.

Many thanks!

@FabienArcellier
Copy link
Collaborator Author

FabienArcellier commented Mar 15, 2024

Hi @FabienArcellier,

could you please share your theming stylesheet from line initial_state.import_stylesheet("theme", "/static/main.css")? I'm trying to get a dark theme for the application but had no luck yet.

Many thanks!

Hi, you have to use !important in all your directive into your css file. It's not practical but it's a consequence of the way vue scope css are working. We plan to change that. That's unfortunattely make usage of tailwindcss not possible yet. We open this #97

I also have an example here : https://github.com/FabienArcellier/spike-streamsync-complex-background

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

Successfully merging this pull request may close these issues.

3 participants