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

CSS / style in header #510

Open
MattTimmons opened this issue Oct 28, 2021 · 1 comment
Open

CSS / style in header #510

MattTimmons opened this issue Oct 28, 2021 · 1 comment

Comments

@MattTimmons
Copy link

MattTimmons commented Oct 28, 2021

Would someone be able to provide a sample of using css styling with Swifter? I have not had luck getting it to work...

            html {
                head {
                    style {
                        bgcolor = "#b51f6a;"
                        background = "#b51f6a;"
                        color = "#b51f6a;"
                    }
                }

Or better yet, an example of using in css file as part of the app resources.

Thanks!

@chockenberry
Copy link

I used this:

style {
    inner = """

body {
    color: pink;
    background-color: red;
}

h1 {
   font-family: "MS Comic Sans";
   font-size: 100px;
}

"""
}

You can also move that into a separate String variable to use it in different page contexts.

-ch

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

No branches or pull requests

2 participants