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

className option for marks #1002

Open
Fil opened this issue Jul 20, 2022 · 5 comments · May be fixed by #1098
Open

className option for marks #1002

Fil opened this issue Jul 20, 2022 · 5 comments · May be fixed by #1098
Labels
enhancement New feature or request

Comments

@Fil
Copy link
Contributor

Fil commented Jul 20, 2022

className should be optional and have no default value, so you have to decide what names you want to use and there are no implicit classes

Related: #253 #6 #126 #490

(Note: for the general plot there is already a top-level className; we'd initially want this only for marks.)

@RLesser
Copy link
Contributor

RLesser commented Jul 20, 2022

Going to take a first stab at this

@llimllib
Copy link

This would make my life a lot easier - when you have to do something outside the bounds of plot, being able to specify a class name would be a big help

@RLesser
Copy link
Contributor

RLesser commented Oct 12, 2022

I can try to have a pull request up this weekend @llimllib, been meaning to do this

@RLesser RLesser linked a pull request Oct 22, 2022 that will close this issue
@mbostock mbostock added the enhancement New feature or request label Dec 2, 2022
@Fil Fil mentioned this issue Apr 1, 2023
@miketalley
Copy link

This functionality would be an excellent addition. Are there any updates on the progress? It looks like there is a PR, but it hasn't been updated in some time.

@thinkingfish
Copy link

thinkingfish commented Apr 30, 2024

Adding support for this issue—I want to further describe a few scenarios where I found custom styling particularly important:

  • a single plot is embedded in an article as "an additional chart" and needs to blend in with the existing plots of non-observable origin;
  • plots rely on Observable Inputs, which can be nearly unusable when mixed with specific CSS rules;
  • even when published mostly in entirety, it is still important to match the notebook style with the navigation bar, etc, see our blog here so the page doesn't feel alien.

We benefit greatly from the capabilities and convenience of Plot. That said, our current solution around these styling issues is partly hacking CSS and partly rewriting some observable visual elements (especially inputs). I'd love to stop doing those two things and stick closer to the vanilla Plot throughout the prototyping to production pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants