Back-to-top button does not follow palette settings
zx80 opened this issue · comments
Context
No response
Bug description
On
theme:
features:
- navigation.top
palette:
primary: orange
The back-to-top button seems to be highlighted with the default indigo color, whereas it would make sense to use the palette setting.
Related links
Reproduction
9.5.19-back-to-top-button-highlight-color.zip
Steps to reproduce
Open the minimal example, move down then up the page, go to the "back-to-top" button and look at its indigo color, whereas another color would make sense.
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.
Thanks for reporting. Material Design mandates the user of two complementing color tints, primary and accent. The back-to-top button uses the accent color for highlighting to denote that you can click it:
If you do not like that, you can easily override the back-to-top button styling with some additional CSS
theme:
features:
- navigation.top
palette:
primary: orange
accent: orange
Closing as working as intended.
Argh, sorry for the noise!
After giving it some thought, think that it would make sense to keep primary
and accent
synchronized by default, i.e. the default accent
value should be the same as primary
unless explicitely told otherwise.
I do not see the value of having to switch two configuration directives to have a consistent choice of color, and this
was my underlying expectation when I (wrongly) reported this as a bug: some color-clever people made informed choices, and I wanted to have the benefit with minimal effort: the colors of the same name are not actually the same colors for primary
and accent
, the former is a brighter version if I'm not mistaken.
Thanks for suggesting. Regardless of whether one would consider this sensical (I kindly disagree), whis would be a departure from the current behavior, which must considered to be a breaking change, as the output changes without the author doing anything. Since this change has zero upside, we cannot consider it.
I hope you understand this decision and just change the color to your liking 😅
I hope you understand this decision and just change the color to your liking 😅
Obviously!