Skip to content

Commit

Permalink
Changed width to max-width for text field style
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Pfohl committed Nov 22, 2023
1 parent 91b7aad commit 6879136
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/textfield-max-width.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openproject/primer-view-components': patch
---

TextField style now uses max-width
12 changes: 6 additions & 6 deletions app/components/primer/alpha/text_field.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -228,27 +228,27 @@
/* widths */
@define-mixin FormControl-input-width {
&.FormControl-input-width--auto {
width: auto;
max-width: auto;
}

&.FormControl-input-width--small {
width: min(256px, 100vw - 2rem);
max-width: min(256px, 100vw - 2rem);
}

&.FormControl-input-width--medium {
width: min(320px, 100vw - 2rem);
max-width: min(320px, 100vw - 2rem);
}

&.FormControl-input-width--large {
width: min(480px, 100vw - 2rem);
max-width: min(480px, 100vw - 2rem);
}

&.FormControl-input-width--xlarge {
width: min(640px, 100vw - 2rem);
max-width: min(640px, 100vw - 2rem);
}

&.FormControl-input-width--xxlarge {
width: min(960px, 100vw - 2rem);
max-width: min(960px, 100vw - 2rem);
}
}

Expand Down

0 comments on commit 6879136

Please sign in to comment.