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] Selectable swatch shape, size, and style #27

Open
proimage opened this issue Nov 11, 2019 · 3 comments
Open

[Feature Request] Selectable swatch shape, size, and style #27

proimage opened this issue Nov 11, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@proimage
Copy link

proimage commented Nov 11, 2019

First off: This plugin is invaluable; thank you so much!

I'm working on a site where I'm needing two colors per swatch, a foreground/text color, and the background color. The current way of displaying multiple colors as a diagonal linear-gradient is great for general use, but it falls a bit short at conveying which color is FG and which is the BG:

image

This can be solved by adding a few simple per-field settings to control the appearance of the swatches in the backend:

  • Swatch Shape: circular / square / wide / tall (wide and tall could be something like 2:1 ratio rectangles)
  • Swatch Size: small / medium / large

And for multi-color swatches only, you could add:

  • Swatch Type: linear / radial / conic (equal to the CSS gradient types; with a disclaimer about the conic mode only working in Webkit browsers)
  • Swatch Direction (linear-only): Horizontal / Vertical / Angled forwards (like this: /) / Angled backwards (like this: \)

Ok, so not all of those are necessary to solve the issue I'm specifically dealing with, but they're all pretty closely related as they simply change the CSS styles being applied to the swatches. ;)

In my use case, and given the options above, I'd probably choose Wide, Medium, & Radial, to convey FG color as a smallish circle inside a colored rectangle:

image

Thanks for your time!

@proimage proimage changed the title [Feature Request] Selectable swatch shape and gradient type for multiple colors [Feature Request] Selectable swatch shape, size, and style Nov 11, 2019
@riasvdv
Copy link

riasvdv commented Nov 13, 2019

I'll gladly accept a PR that implements this! Currently a bit busy to implement myself

@proimage
Copy link
Author

I wish I had the slightest idea how to develop Craft plugins, but I don't. I'm a frontend, HTML/CSS/JS guy. Yii scares the living daylights outta me... O.O

@riasvdv riasvdv added enhancement New feature or request good first issue Good for newcomers labels Dec 12, 2019
@riasvdv
Copy link

riasvdv commented Dec 12, 2019

No worries, Yii scares me too 😄 I'll see if I find the time soon

@michtio michtio added this to the 2.0 milestone Nov 24, 2020
@cookie10codes cookie10codes added this to Needs triage in Colour Swatch via automation Dec 1, 2021
@cookie10codes cookie10codes moved this from Needs triage to 2.0 in Colour Swatch Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Development

No branches or pull requests

5 participants