How Can I add CSS to developer documentation? We c...
# announcements
p
How Can I add CSS to developer documentation? We can use html in multi-line comments like below, but i would also like to use external css for html used inside multi-line comments. How can I achieve this? Thanks
b
Have you tried style html attribute?
p
yes but didn’t work
b
Can you post a snippet of how you tried it?
p
there you go
b
It's a binary file, Can't open
Ah, nvm. Just missing extension
Right, you used style tag (not attribute)
Try this
Copy code
/**
     * <p style="background: #EABB27;"><br> this method may take a long time to return,
     * so you should not call it from the application main thread</p>
     * @return ID string
     */
    public String getID() {
        return "";
    }
p
that works, but I have big css file to reuse over entire codebase documentation. Don’t know how that’s done. Android open source codebase uses it but no idea how.
h
I think this is still using the javadoc tooling, or does it?
Never used it, but I remember that there was a way to configure “themes”. Not sure if you looked into it from that angle?
p
Yes using javadoc tooling it’s possible, but was looking for IntellIJ in-built documentation viewer
h
Ah, sorry. I missed that detail. I am wondering what IntelliJ uses to produce the views. Maybe you found a niche for a plugin?