twskj / pretty-swag

Pretty UI for Swagger spec
MIT License
122 stars 20 forks source link

Replace rem styles #25

Closed edahlseng closed 7 years ago

edahlseng commented 7 years ago

Is it possible to replace the rem styles used in the generated output? I'm trying to embed the documents in a shadow dom, but all of the size and positioning is off in because of the reliance on rem styles

twskj commented 7 years ago

I'll look into this.

edahlseng commented 7 years ago

One-idea for addressing this is to provide a custom style element that doesn't rely on third party styles. I don't completely know where all of the current styles come from, but it looks like a lot of them come from other dependencies?

twskj commented 7 years ago

Core css is from Materializecss with a few custom css I put there. I think I can switch to em but I have to look at it first.

twskj commented 7 years ago

I looked at it and I think it would be best to let you customize css yourself. I'll add a section to insert a custom css.

twskj commented 7 years ago

Now in your config file, you can pass your css like so:

{
    customCSS: "h1{font-size:3em}"    
}
twskj commented 7 years ago

does it help?

twskj commented 7 years ago

I'll close it for now until I hear back from you.

edahlseng commented 7 years ago

Sorry for the delay, I was away for a couple weeks. This works well!