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

Remove autocheck + status-indicator styles #2390

Merged
merged 4 commits into from
Feb 24, 2023
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/beige-badgers-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Remove `autocheck` + `status-indicator` styles
104 changes: 0 additions & 104 deletions src/forms/form-validation.scss
Original file line number Diff line number Diff line change
@@ -1,110 +1,6 @@
// Needs refactoring
// stylelint-disable selector-no-qualifying-type, selector-max-type
dl.form-group > dd, // TODO: Deprecate
.form-group > .form-group-body {
.form-control {
&.is-autocheck-loading,
&.is-autocheck-successful,
&.is-autocheck-errored {
// stylelint-disable-next-line primer/spacing
padding-right: 30px; // Leave some space for our validation icons
}

&.is-autocheck-loading {
background-image: url('/images/spinners/octocat-spinner-16px.gif');
}

&.is-autocheck-successful {
background-image: url('/images/modules/ajax/success.png');
}

&.is-autocheck-errored {
background-image: url('/images/modules/ajax/error.png');
}
}
}

// Retinization of form validation icons that aren't octicons yet
@include retina-media-query {
dl.form-group > dd, // TODO: Deprecate
.form-group > .form-group-body {
.form-control {
&.is-autocheck-loading,
&.is-autocheck-successful,
&.is-autocheck-errored {
background-size: 16px 16px;
}

&.is-autocheck-loading {
background-image: url('/images/spinners/octocat-spinner-32.gif');
}

&.is-autocheck-successful {
background-image: url('/images/modules/ajax/success@2x.png');
}

&.is-autocheck-errored {
background-image: url('/images/modules/ajax/error@2x.png');
}
}
}
}

// Inline verification
// This overrides primer's inline form stuff
.status-indicator {
display: inline-block;
width: 16px;
height: 16px;
// stylelint-disable-next-line primer/spacing
margin-left: 5px;

.octicon {
display: none;
}
}

.status-indicator-success {
// Override primer
&::before {
content: '';
}

.octicon-check {
display: inline-block;
color: var(--color-success-fg);
fill: var(--color-success-fg);
}

.octicon-x {
display: none;
}
}

.status-indicator-failed {
// Override primer
&::before {
content: '';
}

.octicon-check {
display: none;
}

.octicon-x {
display: inline-block;
color: var(--color-danger-fg);
fill: var(--color-danger-fg);
}
}

.status-indicator-loading {
width: 16px;
background-image: url('/images/spinners/octocat-spinner-32-EAF2F5.gif');
background-repeat: no-repeat;
background-position: 0 0;
background-size: 16px;
}

.inline-form {
display: inline-block;
Expand Down