jothepro / doxygen-awesome-css

Custom CSS theme for doxygen html-documentation with lots of customization parameters.
https://jothepro.github.io/doxygen-awesome-css/
MIT License
1.05k stars 118 forks source link

[Feature Request] Changing the style of the @p command #162

Open parmi93 opened 2 months ago

parmi93 commented 2 months ago

I think that readability could be improved by introducing a different style for parameters (@p) and code (@c) commands.

For example, I made a small style change for the @p command with the following result:

Dark mode: image

Light mode: image

Code documentation: image

I added the following parameter in the ALIASES setting: p{1}=<code class="param">\1</code>

and custom.css in the HTML_EXTRA_STYLESHEET setting:

code.param {
    font-weight: 600;
    color: var(--primary-dark-color);
}

Basically I'm copying the style of the parameter names in the function header, by doing this I can visually distinguish more easily when I am referring to a parameter or when I am referring to simple code.

What I don't like about my solution is that I have to use the @p{paramName} syntax instead of @p paramName, which makes comments longer and slightly harder to read.

Do you think it would be possible to implement this change directly in doxygen-awesome-css? Is there a way to continue using the @p paramName syntax?

jothepro commented 1 month ago

Unfortunately it seems like both @p and @c are just rendering to <code> blocks in HTML. I don't think that there is a way to distinguish them based on a CSS rule.

Please consider opening a PR at doxygen/doxygen for this feature.