Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for disabled Safari inputs #1707

Merged
merged 4 commits into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}