1
1
mirror of https://github.com/primer/css.git synced 2024-12-12 10:47:14 +03:00

Fix linting errors

This commit is contained in:
Cole Bemis 2020-09-23 12:58:19 -07:00
parent e153faba5c
commit 91db2f3b20
7 changed files with 40 additions and 57 deletions

View File

@ -21,7 +21,7 @@ body {
}
a {
color: var(--color-link-primary);
color: var(--color-link-primary); // stylelint-disable-line primer/colors
text-decoration: none;
&:hover {

View File

@ -15,6 +15,6 @@
// Enables nesting of different color modes
[data-color-mode] {
color: var(--color-text-primary);
background-color: var(--color-bg-canvas);
color: var(--color-text-primary);
background-color: var(--color-bg-canvas);
}

View File

@ -4,8 +4,8 @@
.Box {
background-color: var(--color-bg-canvas);
border-color: var(--color-border-primary);
border-width: $border-width;
border-style: $border-style;
border-width: $border-width;
border-radius: $border-radius;
}
@ -37,7 +37,6 @@
.Box-row {
padding: $spacer-2 $spacer-3;
}
}
.Box--spacious {
@ -69,7 +68,6 @@
.Box-row {
padding: $spacer-4;
}
}
.Box-header {
@ -108,9 +106,9 @@
// stylelint-disable-next-line primer/spacing
margin-top: -1px;
list-style-type: none; // To account for applying Box component to a list
border-top-width: $border-width;
border-top-style: $border-style;
border-top-color: var(--color-border-primary);
border-top-style: $border-style;
border-top-width: $border-width;
&:first-of-type {
border-top-left-radius: $border-radius;
@ -158,7 +156,6 @@
opacity: 0;
}
}
}
}
@ -191,7 +188,6 @@
// and links are dark-gray with blue hover on desktop.
.Box-row-link {
@include breakpoint(md) {
color: var(--color-text-primary);
text-decoration: none;
@ -199,7 +195,6 @@
color: var(--color-text-link-primary);
text-decoration: none;
}
}
}
@ -213,9 +208,9 @@
padding: $spacer-3;
// stylelint-disable-next-line primer/spacing
margin-top: -1px; // prevents double border when used with .Box-body
border-top-color: var(--color-border-primary);
border-top-style: $border-style;
border-top-width: $border-width;
border-top-color: var(--color-border-primary);
}
// Option for a box with scrolling content
@ -287,7 +282,6 @@
//Box with btn-octicon
.Box-btn-octicon {
// Increase specificity when btn-octicon is used because comes after .Box in the cascade
&.btn-octicon {
padding: $spacer-3 $spacer-3;

View File

@ -34,60 +34,49 @@
.Label--outline, // TODO: Deprecate? It's now the default
.Label--gray {
color: var(--color-scale-gray-6);
border-color: var(--color-scale-gray-2);
color: var(--color-scale-gray-6); // stylelint-disable-line primer/colors
border-color: var(--color-scale-gray-2); // stylelint-disable-line primer/borders
}
.Label--gray-darker {
color: var(--color-scale-gray-9);
// stylelint-disable-next-line primer/borders
border-color: var(--color-scale-gray-5);
color: var(--color-scale-gray-9); // stylelint-disable-line primer/colors
border-color: var(--color-scale-gray-5); // stylelint-disable-line primer/borders
}
// Colors
.Label--yellow {
// stylelint-disable-next-line primer/colors
color: var(--color-scale-yellow-9);
// stylelint-disable-next-line primer/borders
border-color: var(--color-scale-yellow-6);
color: var(--color-scale-yellow-9); // stylelint-disable-line primer/colors
border-color: var(--color-scale-yellow-6); // stylelint-disable-line primer/borders
}
.Label--orange {
// stylelint-disable-next-line primer/colors
color: var(--color-scale-orange-8);
// stylelint-disable-next-line primer/borders
border-color: var(--color-scale-orange-5);
color: var(--color-scale-orange-8); // stylelint-disable-line primer/colors
border-color: var(--color-scale-orange-5); // stylelint-disable-line primer/borders
}
.Label--red {
color: var(--color-scale-red-5);
// stylelint-disable-next-line primer/borders
border-color: var(--color-scale-red-6);
color: var(--color-scale-red-5); // stylelint-disable-line primer/colors
border-color: var(--color-scale-red-6); // stylelint-disable-line primer/borders
}
.Label--outline-green, // TODO: Deprecate
.Label--green {
// stylelint-disable-next-line primer/colors
color: var(--color-scale-green-6);
// stylelint-disable-next-line primer/borders
border-color: var(--color-scale-green-5);
color: var(--color-scale-green-6); // stylelint-disable-line primer/colors
border-color: var(--color-scale-green-5); // stylelint-disable-line primer/borders
}
.Label--blue {
color: var(--color-scale-blue-5);
border-color: var(--color-scale-blue-5);
color: var(--color-scale-blue-5); // stylelint-disable-line primer/colors
border-color: var(--color-scale-blue-5); // stylelint-disable-line primer/borders
}
.Label--purple {
color: var(--color-scale-purple-5);
// stylelint-disable-next-line primer/borders
border-color: var(--color-scale-purple-4);
color: var(--color-scale-purple-5); // stylelint-disable-line primer/colors
border-color: var(--color-scale-purple-4); // stylelint-disable-line primer/borders
}
.Label--pink {
// stylelint-disable-next-line primer/colors
color: var(--color-scale-pink-6);
// stylelint-disable-next-line primer/borders
border-color: var(--color-scale-pink-4);
color: var(--color-scale-pink-6); // stylelint-disable-line primer/colors
border-color: var(--color-scale-pink-4); // stylelint-disable-line primer/borders
}

View File

@ -29,15 +29,15 @@
}
.State--green {
background-color: var(--color-scale-green-5);
background-color: var(--color-scale-green-5); // stylelint-disable-line primer/colors
}
.State--red {
background-color: var(--color-scale-red-5);
background-color: var(--color-scale-red-5); // stylelint-disable-line primer/colors
}
.State--purple {
background-color: var(--color-scale-purple-5);
background-color: var(--color-scale-purple-5); // stylelint-disable-line primer/colors
}
// Small

View File

@ -32,7 +32,7 @@
display: none;
width: 0;
height: 0;
color: var(--color-bg-canvas-inverse);
color: var(--color-bg-canvas-inverse); // stylelint-disable-line primer/colors
pointer-events: none;
content: "";
// stylelint-disable-next-line primer/borders

View File

@ -17,13 +17,13 @@
.text-warning { color: var(--color-text-warning) !important; }
// Icon colors
.icon-primary { color: var(--color-icon-primary) !important; }
.icon-secondary { color: var(--color-icon-secondary) !important; }
.icon-tertiary { color: var(--color-icon-tertiary) !important; }
.icon-info { color: var(--color-icon-info) !important; }
.icon-danger { color: var(--color-icon-danger) !important; }
.icon-success { color: var(--color-icon-success) !important; }
.icon-warning { color: var(--color-icon-warning) !important; }
.icon-primary { color: var(--color-icon-primary) !important; } // stylelint-disable-line primer/colors
.icon-secondary { color: var(--color-icon-secondary) !important; } // stylelint-disable-line primer/colors
.icon-tertiary { color: var(--color-icon-tertiary) !important; } // stylelint-disable-line primer/colors
.icon-info { color: var(--color-icon-info) !important; } // stylelint-disable-line primer/colors
.icon-danger { color: var(--color-icon-danger) !important; } // stylelint-disable-line primer/colors
.icon-success { color: var(--color-icon-success) !important; } // stylelint-disable-line primer/colors
.icon-warning { color: var(--color-icon-warning) !important; } // stylelint-disable-line primer/colors
// Border colors
.border-primary { border-color: var(--color-border-primary) !important; }
@ -118,10 +118,10 @@
.border-white-fade { border-color: $border-white-fade !important; }
.border-white-fade-15 { border-color: $border-white-fade !important; }
.border-white-fade-30 { border-color: $white-fade-30 !important; }
.border-white-fade-50 { border-color: $white-fade-50 !important; }
.border-white-fade-70 { border-color: $white-fade-70 !important; }
.border-white-fade-85 { border-color: $white-fade-85 !important; }
.border-white-fade-30 { border-color: $white-fade-30 !important; } // stylelint-disable-line primer/borders
.border-white-fade-50 { border-color: $white-fade-50 !important; } // stylelint-disable-line primer/borders
.border-white-fade-70 { border-color: $white-fade-70 !important; } // stylelint-disable-line primer/borders
.border-white-fade-85 { border-color: $white-fade-85 !important; } // stylelint-disable-line primer/borders
// Link colors
// Sets the links color to $text-gray and $text-blue on hover