Skip to content

Add color input #2824

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add color input #2824

wants to merge 2 commits into from

Conversation

coorasse
Copy link

@coorasse coorasse commented Apr 3, 2025

Adds a Field::Color to render a color picker. It uses the HTML color picker input in the form and shows a small square with the color in the index and show.

Form

CleanShot 2025-04-03 at 21 30 16@2x

Show

CleanShot 2025-04-03 at 21 30 28@2x

Index

CleanShot 2025-04-03 at 21 30 58@2x

Comment on lines +95 to +97
[type="color"] {
padding: 0 0.5em;
}
Copy link
Author

Choose a reason for hiding this comment

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

the padding on top and bottom of 0.5em made the color in the input field basically disappear. I had to override it

margin-right: 0.5em;
}
}

Copy link
Author

Choose a reason for hiding this comment

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

I am not sure this fits in this CSS file to be honest

Copy link
Author

Choose a reason for hiding this comment

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

I probably could test more....but I added a field in the demo app 😄

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.

1 participant