Skip to content

Commit

Permalink
Fix field label style
Browse files Browse the repository at this point in the history
  • Loading branch information
henck committed Feb 19, 2024
1 parent 5f0f0ae commit 1658cb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@independent-software/typeui",
"version": "1.2.18",
"version": "1.2.19",
"description": "TypeUI",
"keywords": [
"react",
Expand Down
5 changes: 2 additions & 3 deletions src/controls/Form/FieldWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const FieldWrapper = styled(FieldWrapperBase)`
border-color: ${lighten(0.25, p.theme.primaryColor)};
}
/* Label */
&>*:nth-child(1) {
& > *:nth-child(1) {
padding-left: 15px;
padding-right: 14px;
line-height: 12px;
Expand All @@ -65,10 +65,9 @@ const FieldWrapper = styled(FieldWrapperBase)`
font-variant: all-small-caps;
opacity: ${p.error ? 0 : 1};
color: #2C4253;
}
/* Hint/error */
&>*:nth-child(3) {
& > *:nth-child(3) {
position: absolute;
${p.error && css`left: 12px;`}
${!p.error && css`right: 12px;`}
Expand Down
3 changes: 3 additions & 0 deletions src/controls/Form/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ const Label = styled(LabelBase)`
font-size: 80%;
margin-right: 1em;
color: ${p => lighten(0.5, p.theme.fontColor)};
white-space: nowrap;
overflow-x: hidden;
text-overflow: ellipsis;
/* Ordinarily, labels are displayed above the field control: */
display: block;
Expand Down

0 comments on commit 1658cb2

Please sign in to comment.