-
Notifications
You must be signed in to change notification settings - Fork 586
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "refactor(FormControl): update FormControl to use CSS …
…Modules …" This reverts commit 43afd36.
- Loading branch information
1 parent
c7b109d
commit 587fcd0
Showing
12 changed files
with
404 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": minor | ||
--- | ||
|
||
Update FormControl to use CSS Modules behind feature flag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
.ControlHorizontalLayout { | ||
display: flex; | ||
|
||
&:where([data-has-leading-visual]) { | ||
align-items: center; | ||
} | ||
} | ||
|
||
.ControlVerticalLayout { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
|
||
& > *:not(label) + * { | ||
margin-top: var(--base-size-4); | ||
} | ||
|
||
&[data-has-label] > * + * { | ||
margin-top: var(--base-size-4); | ||
} | ||
} | ||
|
||
.ControlChoiceInputs > input { | ||
margin-right: 0; | ||
margin-left: 0; | ||
} | ||
|
||
.LabelContainer { | ||
> * { | ||
/* stylelint-disable-next-line primer/spacing */ | ||
padding-left: var(--stack-gap-condensed); | ||
} | ||
|
||
> label { | ||
font-weight: var(--base-text-weight-normal); | ||
} | ||
} | ||
|
||
.LeadingVisual { | ||
margin-left: var(--base-size-8); | ||
color: var(--fgColor-muted); | ||
|
||
&:where([data-disabled]) { | ||
color: var(--control-fgColor-disabled); | ||
} | ||
|
||
> * { | ||
min-width: var(--text-body-size-large); | ||
min-height: var(--text-body-size-large); | ||
fill: currentColor; | ||
} | ||
|
||
> *:where([data-has-caption]) { | ||
min-width: var(--base-size-24); | ||
min-height: var(--base-size-24); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.Caption { | ||
display: block; | ||
font-size: var(--text-body-size-small); | ||
color: var(--fgColor-muted); | ||
|
||
&:where([data-control-disabled]) { | ||
color: var(--control-fgColor-disabled); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.