Skip to content

Open-source document signature platform. Not affiliated with DocuSign.

TypeScript

Draw one chevron on every select, with room on the right

Claudea129941901c5
diff --git a/src/app/globals.css b/src/app/globals.css
index 63bf23a..bced932 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -141,6 +141,31 @@
cursor: pointer;
}
+ /*
+ * Every select draws the same chevron instead of the browser's own caret,
+ * which sits flush against the right edge and differs between browsers.
+ * The SVG is the Lucide chevron-down used elsewhere, in the secondary ink.
+ */
+ select {
+ appearance: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ cursor: pointer;
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23575a6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
+ background-repeat: no-repeat;
+ background-position: right 0.875rem center;
+ background-size: 1rem 1rem;
+ padding-right: 2.75rem;
+ }
+
+ select:disabled {
+ cursor: not-allowed;
+ }
+
+ select::-ms-expand {
+ display: none;
+ }
+
input::placeholder,
textarea::placeholder {
color: var(--placeholder);
@@ -323,6 +348,16 @@
box-shadow 120ms ease;
}
+ /* .field-input's background shorthand clears the chevron, so add it back. */
+ select.field-input {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23575a6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
+ background-repeat: no-repeat;
+ background-position: right 0.875rem center;
+ background-size: 1rem 1rem;
+ padding-right: 2.75rem;
+ text-overflow: ellipsis;
+ }
+
.field-input:hover {
border-color: var(--border-hover);
}
diff --git a/src/components/signing/signing-live-shell.tsx b/src/components/signing/signing-live-shell.tsx
index 25e5bf7..fd488a4 100644
--- a/src/components/signing/signing-live-shell.tsx
+++ b/src/components/signing/signing-live-shell.tsx
@@ -1581,7 +1581,7 @@ function CurrentSignerField({
>
<select
aria-label={getFieldLabel(field)}
- className={`h-full w-full cursor-pointer border-none bg-transparent px-1.5 text-sm outline-none ${
+ className={`h-full w-full cursor-pointer border-none bg-transparent bg-size-[0.75rem] bg-position-[right_0.25rem_center] pr-5 pl-1.5 text-sm outline-none ${
textValue ? "text-(--fg)" : "text-(--secondary)"
}`}
id={`signing-field-${field.id}`}