Content-Length: 374021 | pFad | http://github.com/lowcoder-org/lowcoder/commit/c9cdee73836193e1d2519654bfe7e0099d462c95

C7 add placeholder styling for input · lowcoder-org/lowcoder@c9cdee7 · GitHub
Skip to content

Commit c9cdee7

Browse files
committed
add placeholder styling for input
1 parent c9a8de4 commit c9cdee7

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,23 @@ export function getStyle(style: InputLikeStyleType, labelStyle?: LabelStyleType)
315315
}
316316
317317
&::-webkit-input-placeholder {
318-
color: ${style.text};
319-
opacity: 0.4;
318+
color: ${style.placeholder};
319+
opacity: 1;
320+
}
321+
322+
&::-moz-placeholder {
323+
color: ${style.placeholder};
324+
opacity: 1;
325+
}
326+
327+
&:-ms-input-placeholder {
328+
color: ${style.placeholder};
329+
opacity: 1;
330+
}
331+
332+
&::placeholder {
333+
color: ${style.placeholder};
334+
opacity: 1;
320335
}
321336
322337
.ant-input-show-count-suffix,

client/packages/lowcoder/src/comps/controls/styleControlConstants.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,14 @@ export type DepColorConfig = CommonColorConfig & {
244244
transformer: (color: string, ...rest: string[]) => string;
245245
};
246246

247+
export type PlaceholderConfig = CommonColorConfig & {
248+
readonly placeholder?: string;
249+
};
250+
247251
export type SingleColorConfig =
248252
| SimpleColorConfig
249253
| DepColorConfig
254+
| PlaceholderConfig
250255
| RadiusConfig
251256
| BorderWidthConfig
252257
| RotationConfig
@@ -1309,11 +1314,19 @@ export const DisabledSliderStyle = [
13091314
...DISABLED_SLIDER_STYLE_FIELDS,
13101315
] as const;
13111316

1317+
const PLACEHOLDER = {
1318+
name: "placeholder",
1319+
label: "Placeholder",
1320+
depName: "text",
1321+
transformer: (color: string) => lightenColor(color, 0.4),
1322+
} as const;
1323+
13121324
export const InputLikeStyle = [
13131325
getStaticBackground(SURFACE_COLOR),
13141326
BOXSHADOW,
13151327
BOXSHADOWCOLOR,
13161328
...STYLING_FIELDS_SEQUENCE.filter((style)=>style.name!=='rotation' && style.name!=='lineHeight'),
1329+
PLACEHOLDER,
13171330
...ACCENT_VALIDATE,
13181331
] as const;
13191332

@@ -2536,3 +2549,4 @@ export function marginCalculator(margin: string) {
25362549
}
25372550

25382551
export type {ThemeDetail};
2552+

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/lowcoder-org/lowcoder/commit/c9cdee73836193e1d2519654bfe7e0099d462c95

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy