Skip to content

Commit 534ff62

Browse files
authored
Merge pull request #737 from primer/brocs_test
Add new yellow utilities and variables
2 parents e0157ab + 28f4dce commit 534ff62

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

pages/css/utilities/colors.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,16 @@ Background colors are most commonly used for filling large blocks of content or
7575
</div>
7676
<div class="col-9 float-left">
7777
<div class="container-lg clearfix">
78-
<div class="h4">.bg-yellow-light</div>
79-
<code>{colors.yellow[2]}, $bg-yellow-light</code>
80-
<Swatch className="bg-yellow-light" />
78+
<div class="col-6 float-left">
79+
<div class="h4">.bg-yellow-dark</div>
80+
<code>{colors.yellow[7]}, $bg-yellow-dark</code>
81+
<Swatch className="bg-yellow-dark border-right-0" />
82+
</div>
83+
<div class="col-6 float-left">
84+
<div class="h4">.bg-yellow-light</div>
85+
<code>{colors.yellow[2]}, $bg-yellow-light</code>
86+
<Swatch className="bg-yellow-light" />
87+
</div>
8188
</div>
8289
</div>
8390
</div>
@@ -173,6 +180,10 @@ You can set the color inheritance on an element by using the `text-inherit` clas
173180
.text-orange-light on white
174181
</div>
175182
<span class="float-left text-red tooltipped tooltipped-n" aria-label="Does not meet accessibility standards"><%= octicon("alert") %></span>
183+
<div class="text-yellow mb-2">
184+
.text-yellow on white
185+
</div>
186+
<span class="float-left text-red tooltipped tooltipped-n" aria-label="Does not meet accessibility standards"><%= octicon("alert") %></span>
176187
<div class="text-green mb-2 ml-4">
177188
.text-green on white
178189
</div>
@@ -199,6 +210,9 @@ You can set the color inheritance on an element by using the `text-inherit` clas
199210
<div class="bg-green-light mb-2">
200211
.text-gray-dark on .bg-green-light
201212
</div>
213+
<div class="bg-yellow-dark mb-2">
214+
.text-gray-dark on .bg-yellow-dark
215+
</div>
202216
<div class="bg-yellow mb-2">
203217
.text-gray-dark on .bg-yellow
204218
</div>

src/support/variables/colors.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ $bg-red-light: $red-100 !default;
5353
$bg-white: $white !default;
5454
$bg-yellow: $yellow-500 !default;
5555
$bg-yellow-light: $yellow-200 !default;
56+
$bg-yellow-dark: $yellow-700 !default;
5657

5758
// Text colors
5859
$text-blue: $blue-500 !default;
@@ -66,3 +67,4 @@ $text-purple: $purple !default;
6667
$text-pink: $pink-500 !default;
6768
$text-red: $red-600 !default;
6869
$text-white: $white !default;
70+
$text-yellow: $yellow-800 !default;

src/utilities/colors.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// stylelint-disable primer/selector-no-utility
33
// stylelint-disable block-opening-brace-space-before, comment-empty-line-before
44

5+
@warn ".text-pending and .bg-pending will be deprecated in 13.0.0. Use .text-yellow and .bg-yellow-dark instead";
6+
57
// background colors
68
/* Set the background to $bg-white */
79
.bg-white { background-color: $bg-white !important; }
@@ -27,6 +29,8 @@
2729
.bg-yellow { background-color: $bg-yellow !important; }
2830
/* Set the background to $bg-yellow-light */
2931
.bg-yellow-light { background-color: $bg-yellow-light !important; }
32+
/* Set the background to $bg-yellow-dark */
33+
.bg-yellow-dark { background-color: $bg-yellow-dark !important; }
3034
/* Set the background to $bg-purple */
3135
.bg-purple { background-color: $bg-purple !important; }
3236
/* Set the background to $bg-pink */
@@ -61,6 +65,8 @@
6165
.text-gray-dark { color: $text-gray-dark !important; }
6266
/* Set the text color to $text-green */
6367
.text-green { color: $text-green !important; }
68+
/* Set the text color to $text-yellow */
69+
.text-yellow { color: $text-yellow !important; }
6470
/* Set the text color to $text-orange */
6571
.text-orange { color: $text-orange !important; }
6672
/* Set the text color to $text-orange-light */
@@ -74,10 +80,10 @@
7480
/* Set the text color to inherit */
7581
.text-inherit { color: inherit !important; }
7682

77-
// Text states
78-
// These can probably all be regular utilities
83+
// Pending states
84+
// This will be deprecated in the future, use .text-yellow instead
7985
.text-pending { color: $yellow-800 !important; }
80-
// Separate text and background colors in future to improve a11y
86+
// This will be deprecated in the future, use .bg-yellow-dark instead
8187
.bg-pending { color: $yellow-700 !important; }
8288

8389
// Link colors

0 commit comments

Comments
 (0)