Skip to content
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

Feature request: Allow to disable Webkit scrollbar styling #9549

Closed
jothepro opened this issue Aug 29, 2022 · 7 comments
Closed

Feature request: Allow to disable Webkit scrollbar styling #9549

jothepro opened this issue Aug 29, 2022 · 7 comments
Labels
enhancement a request to enhance doxygen, not a bug HTML HTML / XHTML output

Comments

@jothepro
Copy link

In 260f2fa custom styling for scrollbars was introduced.

I'd prefer to keep the default browser scrollbar in some places, though.
Unfortunately it is not possible to deactivate the scrollbar customization by adding custom CSS on top of it.

This is why I need to be able to disable the scrollbar customization in the Doxyfile, so it is not added to doxygen.css in the first place.

E.g. DISABLE_SCROLLBAR_STYLING = YES.

What's your take on that? As an alternative I could entirely replace doxygen.css with my own stylesheet, but AFAIK this is not recommended and I'd like to avoid it.

@albert-github albert-github added enhancement a request to enhance doxygen, not a bug HTML HTML / XHTML output labels Aug 29, 2022
jothepro added a commit to jothepro/doxygen-awesome-css that referenced this issue Aug 29, 2022
The new Doxygen version comes with some small CSS adjustments
that required fixes in this theme.

Nervertheless it is NOT recommended to update to the new Doxygen
version! Doxygen 1.9.5 comes with scrollbar customizations that don't
work well together with this theme and they can not be
reverted/patched with just CSS.

See doxygen/doxygen#9549
@doxygen
Copy link
Owner

doxygen commented Aug 31, 2022

@jothepro This is indeed an unfortunate limitation I did not foresee.

Actually seems like a bug introduced in recent versions of chromium.

In the past:

::-webkit-scrollbar {
    all:unset;
}

apparently worked to reset the style.

See here for a potential workaround: https://stackoverflow.com/a/72511916/784672
If it doesn't work, I'll see if an option can be added.

@jothepro
Copy link
Author

jothepro commented Sep 1, 2022

Yep, it seems like just unsetting doesn't work:

Bildschirmfoto 2022-09-01 um 10 22 16

Taking this further and unsetting all the styles that have been applied to the scrollbar will lead to an invisible/hidden scrollbar.

The closest I can get to the original look on Windows is this:

Bildschirmfoto 2022-09-01 um 11 02 55

Applied CSS (Source: https://stackoverflow.com/a/72511916/3199794)

::-webkit-scrollbar
{
all:unset;
}

::-webkit-scrollbar-button
{
display:block;
background-color:ButtonFace;
box-shadow:inset 0px 0px 0px 20px rgba(255,255,255,0.3);
height: auto;
width: initial;
background-position: center 5px;
background-size:9px 7px;
image-rendering: pixelated;
background-repeat:no-repeat;

}

::-webkit-scrollbar-button:hover
{
box-shadow:inset 0px 0px 0px 20px rgba(128,128,128,0.5);
}

::-webkit-scrollbar-button:active
{
box-shadow:inset 0px 0px 0px 20px rgba(128,128,128,0.7);
}

::-webkit-scrollbar-button:vertical:start:increment,
::-webkit-scrollbar-button:vertical:end:decrement
{
display:none;
}

::-webkit-scrollbar-button:vertical:decrement
{
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='ButtonText'><polygon points='50,00 0,50 100,50'/></svg>");
}

::-webkit-scrollbar-button:vertical:increment
{
background-position: center 6px;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='ButtonText'><polygon points='0,0 100,0 50,50'/></svg>");
}

::-webkit-scrollbar-thumb
{
background-color:ButtonFace;
box-shadow:inset 0px 0px 0px 20px rgba(128,128,128,0.3);
border-left:2px solid rgba(255,255,255,0.3);
border-right:2px solid rgba(255,255,255,0.3);
}

::-webkit-scrollbar-thumb:hover
{
box-shadow:inset 0px 0px 0px 20px rgba(128,128,128,0.5);
}

::-webkit-scrollbar-thumb:active
{
box-shadow:inset 0px 0px 0px 20px rgba(128,128,128,0.7);
}

::-webkit-scrollbar-track
{
background-color:ButtonFace;
box-shadow:inset 0px 0px 0px 20px rgba(255,255,255,0.3);
}

But this won't work on macOS and on Android where the default scrollbars look and behave very different. 😞

@doxygen
Copy link
Owner

doxygen commented Sep 1, 2022

@jothepro To avoid introducing yet another option, I'm thinking about adding the ::-webkit-scrollbar stuff to doxygen.css only when no HTML_EXTRA_STYLESHEET has been specified. With the idea that you can always add back the scrollbar styling in the extra stylesheet if you need it. What do you think?

@jothepro
Copy link
Author

jothepro commented Sep 1, 2022

This would also solve my problem. 👍

@doxygen
Copy link
Owner

doxygen commented Sep 4, 2022

@jothepro Please verify if the referenced commit indeed solves the problem. Please do not close the issue, it will be done automatically when a new release is made available.

@doxygen doxygen added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Sep 4, 2022
@jothepro
Copy link
Author

I can confirm that this solves my problem! Thanks a lot! 😊

@doxygen
Copy link
Owner

doxygen commented Dec 27, 2022

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.6.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Dec 27, 2022
@doxygen doxygen closed this as completed Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to enhance doxygen, not a bug HTML HTML / XHTML output
Projects
None yet
Development

No branches or pull requests

3 participants