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

Add color support for copy and toggle buttons #767

Merged
merged 3 commits into from
Jun 30, 2022

Conversation

choldgraf
Copy link
Collaborator

This adds color support for two more web component extensions: sphinx-copybutton and sphinx-togglebutton. It does this by adding another SCSS extensions file for each, and adds them to our docs.

@choldgraf choldgraf force-pushed the sphinx-togglebutton branch 2 times, most recently from 9d2ad74 to 632af34 Compare June 29, 2022 05:31
@drammock
Copy link
Collaborator

sphinx-togglebutton seems (almost) redundant with sphinx-design dropdowns... I mean, the functionality is the same, but the styling is different because togglebuttons add that functionality to existing sphinx admonitions. I'm not sure what else to say about that other than it feels non-DRY but I guess it makes sense for the theme to work smoothly with either one? 🤷🏻

@choldgraf
Copy link
Collaborator Author

choldgraf commented Jun 30, 2022

I'm not sure what else to say about that other than it feels non-DRY but I guess it makes sense for the theme to work smoothly with either one

My feeling is that this theme should support a variety of extensions and sub-packages, as long as they have active use in our stakeholder communities (PyData), and they do not require a lot of extra maintenance burden. In this case, it just means adding some special-cased CSS which shouldn't be too hard to maintain.

In the future if there is consolidation around a single package, we could re-work our CSS here to unify under a specific package, but at least for now there are multiple projects using each (for example, Jupyter Book / MyST-NB ship with sphinx-togglebutton, while Sphinx Design tends to be used more by end-users)

Copy link
Collaborator

@drammock drammock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you've convinced me :)

@drammock drammock merged commit dd9e85d into pydata:main Jun 30, 2022
@jarrodmillman jarrodmillman added this to the 0.10 milestone Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants