-
-
Notifications
You must be signed in to change notification settings - Fork 36
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 for document
#265
Comments
Just put it in the outermost div! App() do
DOM.div(Styles(...), your_page)
end Let me know if that works! |
🙅♂️I also tried that one. Sorry I didn't include it here.
and nope. I don't find the |
You can create the whole document with DOM.body/meta/html |
I think the confusion might be due to a bug in how styles get included: julia> ss=Styles(CSS("height"=>"100%","width"=>"100%","background"=>"black"))
{
height: 100%;
width: 100%;
background: black;
}
julia> string(DOM.div(style=ss))
"<div style=\" { height: 100%; width: 100%; background: black; } \"></div>" And wrapping in |
My apologies - in my case I was trying to render the html directly in order to push to electron (I know about the electron integration, but I preferred to manage the window myself). However, the page was still making calls to the bonito server, and they were getting blocked by cors. As far as I understand this was the cause of the error, since the page renders correctly both in browser and in electron when loading the url. |
where should I pass the Styles for the main document? I tried in
Page(; style=Styles(,..))
and
App(; style=Styles(,...)
but none of them are the way
The text was updated successfully, but these errors were encountered: