Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tweaks to CSS for long templated functions #84

@artem-ogre

Description

@artem-ogre

First, I would like to say huge thank you for this project! It is awesome indeed. Applying the theme completely changed the feel of the documentation generated with Doxygen. If feels modern and well looked after. In my opinion this is the experience that Doxygen should aim to provide out of the box.

However, there are some issues with the output for long templated functions: no wrap-around leading to horizontal scrolling and sub-optimal experience especially on mobile devices.

'Before' example:

Screenshot from 2022-08-09 15-20-50

CSS tweaks to improve situation

/* make text of template declarations wrap */
.memItemLeft,
.memTemplItemLeft {
    white-space: normal;
}
.memTemplParams {
    white-space: normal;
}

/* add padding on the right of 'function declaration' block to separate it from 'return value' block */
table.memberdecls .memItemLeft,
table.memberdecls .memTemplItemLeft {
    padding-right: var(--spacing-large);
}

/* add padding on the bottom of 'template parameters' block to separate template parameters from function-declaration and return-value blocks */
table.memberdecls .memTemplParams {
    padding-bottom: var(--spacing-medium);
}

/* change vertical alighment in funciton-declaration block to 'top' to better align return-value and funciton-declaration blocks */
table.memberdecls .memItemRight,
table.memberdecls .memTemplItemRight {
    vertical-align: top;
}

'After' example:

Screenshot from 2022-08-09 15-21-36

Conclusion

These tweaks work quite well for me so I was thinking that it might be something useful for you. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions