Skip to content

Commit

Permalink
Fix for disabled Safari inputs (primer#1707)
Browse files Browse the repository at this point in the history
* Fix for disabled Safari inputs

* Create lovely-rabbits-fly.md

* Fix linter warning

* Update src/forms/form-control.scss

Co-authored-by: simurai <[email protected]>

Co-authored-by: Jon Rohan <[email protected]>
Co-authored-by: simurai <[email protected]>
  • Loading branch information
3 people authored Oct 27, 2021
1 parent af5a3ae commit a997790
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-rabbits-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Fix for disabled Safari inputs
22 changes: 15 additions & 7 deletions src/forms/form-control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ label {
color: var(--color-primer-fg-disabled);
background-color: var(--color-input-disabled-bg);
border-color: var(--color-border-default);
-webkit-text-fill-color: var(--color-primer-fg-disabled); // Fix for Safari
opacity: 1; // Fix for Safari iOS

&::placeholder {
color: var(--color-primer-fg-disabled);
Expand All @@ -69,7 +71,9 @@ textarea.form-control {
.input-contrast {
background-color: var(--color-canvas-inset);

&:focus { background-color: var(--color-canvas-default); }
&:focus {
background-color: var(--color-canvas-default);
}
}

// Custom styling for HTML5 validation bubbles (WebKit only)
Expand Down Expand Up @@ -139,8 +143,8 @@ textarea.form-control {
}
}

input[type=checkbox],
input[type=radio] {
input[type='checkbox'],
input[type='radio'] {
float: left;
// stylelint-disable-next-line primer/spacing
margin: 5px 0 0 -20px;
Expand All @@ -164,7 +168,7 @@ textarea.form-control {
&:checked {
// child of sibling or sibling
~ * .form-checkbox-details,
~ .form-checkbox-details { // eslint-disable selector-combinator-space-before
~ .form-checkbox-details {
display: block;
}
}
Expand Down Expand Up @@ -206,8 +210,10 @@ textarea.form-control {
margin: 28px 25px 0 -20px;
}

// stylelint-disable-next-line primer/spacing
.form-select { margin-top: 5px; }
.form-select {
// stylelint-disable-next-line primer/spacing
margin-top: 5px;
}
}

// Hide the up/down buttons in <input type="number"> in the login form, the
Expand Down Expand Up @@ -249,5 +255,7 @@ input::-webkit-inner-spin-button {
line-height: $lh-default;
}

a { font-weight: $font-weight-bold; }
a {
font-weight: $font-weight-bold;
}
}

0 comments on commit a997790

Please sign in to comment.