Skip to content

Commit 9af7f3a

Browse files
committed
Update references to _theme/components in file names
1 parent 60bb486 commit 9af7f3a

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

_includes/sxs/02-extending/part-three.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ <h3 class="step">Add stylesheet partial.</h3>
8686
Create a new stylesheet partial for our new component by entering the following in the free terminal window:
8787
</p>
8888
<div class="terminal">
89-
<pre>touch assets/css/components/_my-testimonial.scss</pre>
89+
<pre>touch _theme/components/_my-testimonial.scss</pre>
9090
</div>
9191
<p class="step-description">
9292
And then we'll import this new stylesheet into our USWDS custom styles.
@@ -95,15 +95,15 @@ <h3 class="step">Add stylesheet partial.</h3>
9595
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/_uswds-theme-custom-styles.scss</h4>
9696
<pre class="blur">@use "uswds-core" as *;
9797
@forward "../assets/css/styles.scss";
98-
@forward "/components/_my-card.scss";
99-
</pre><pre class="add">@forward "/components/_my-testimonial.scss";</pre>
98+
@forward "components/_my-card.scss";
99+
</pre><pre class="add">@forward "components/_my-testimonial.scss";</pre>
100100
</div>
101101
<h3 class="step">Start styling the component.</h3>
102102
<p class="step-description">
103103
Just like using the <strong>color()</strong> function to use USWDS color tokens, we can use <strong>units()</strong> and other token functions to use tokens in native CSS properties. To get our base styles for our new component, add the following styles to the new stylesheet:
104104
</p>
105105
<div class="editor">
106-
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> assets/css/components/_my-testimonial.scss</h4>
106+
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/components/_my-testimonial.scss</h4>
107107
<pre class="add">
108108
@use "uswds-core" as *;
109109

@@ -154,7 +154,7 @@ <h3 class="step">Style the testimonial icon.</h3>
154154
USWDS uses variables to maintain consistent styles across different definitions. Let's create a variable for our icon stroke and fill at the top of our stylesheet.
155155
</p>
156156
<div class="editor">
157-
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> assets/css/components/_my-testimonial.scss</h4>
157+
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/components/_my-testimonial.scss</h4>
158158
<pre class="blur">@use "uswds-core" as *;
159159

160160
</pre>
@@ -183,7 +183,7 @@ <h3 class="step">Using USWDS theme tokens with mixins.</h3>
183183
Using a combination of utility mixins and USWDS theme settings can help add uniformity across your project. In this example, we'll add the border settings and padding settings from earlier to help our new component sit nicely with the original card. The <strong>u-margin-x()</strong> mixin lets you set left and right margin at the same time.
184184
</p>
185185
<div class="editor">
186-
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> assets/css/components/_my-testimonial.scss</h4>
186+
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/components/_my-testimonial.scss</h4>
187187
<pre class="blur">.my-testimonial {</pre>
188188
<pre class="add"> @include u-border($theme-card-border-width);
189189
@include u-margin-x(1);
@@ -201,7 +201,7 @@ <h3 class="step">Adjusting color, background, and contrast.</h3>
201201
Finally, let's change the color of our testimonial component. The traditional way to set background and color is to use two separate rules. If we want to use our primary colors in this component, we can use the following two rules:
202202
</p>
203203
<div class="editor">
204-
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> assets/css/components/_my-testimonial.scss</h4>
204+
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/components/_my-testimonial.scss</h4>
205205
<pre class="blur">.my-testimonial {
206206
@include u-border($theme-card-border-width);
207207
@include u-margin-x(1);
@@ -223,7 +223,7 @@ <h4 class="filename"><span class="material-icons" aria-hidden="true">description
223223
</p>
224224

225225
<div class="editor">
226-
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> assets/css/components/_my-testimonial.scss</h4>
226+
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/components/_my-testimonial.scss</h4>
227227
<pre class="blur">.my-testimonial {
228228
@include u-border($theme-card-border-width);
229229
@include u-margin-x(1);
@@ -238,7 +238,7 @@ <h4 class="filename"><span class="material-icons" aria-hidden="true">description
238238
This time, when you save and compile you'll see a warning in the terminal. Let's update our code to use <strong>primary-lighter</strong> as our text color.
239239
</p>
240240
<div class="editor">
241-
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> assets/css/components/_my-testimonial.scss</h4>
241+
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/components/_my-testimonial.scss</h4>
242242
<pre class="blur">.my-testimonial {
243243
@include u-border($theme-card-border-width);
244244
@include u-margin-x(1);

_includes/sxs/02-extending/part-two.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h3 class="step">Create a custom stylesheet for our custom card component.</h3>
4040
Now let's add our new <strong>my-card</strong> stylesheet. It's standard naming convention to prefix SCSS partials with an underscore (as we've already seen in <strong>_uswds-theme</strong> and <strong>_uswds-theme-custom-styles</strong>).
4141
</p>
4242
<div class="terminal">
43-
<pre>touch assets/css/components/_my-card.scss</pre>
43+
<pre>touch _theme/components/_my-card.scss</pre>
4444
</div>
4545

4646
<h3 class="step">Import the new stylesheet into USWDS custom styles.</h3>
@@ -51,7 +51,7 @@ <h3 class="step">Import the new stylesheet into USWDS custom styles.</h3>
5151
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/_uswds-theme-custom-styles.scss</h4>
5252
<pre class="blur">@use "uswds-core" as *;
5353
@forward "../assets/css/styles.scss";
54-
</pre><pre class="add">@forward "/components/_my-card.scss";</pre>
54+
</pre><pre class="add">@forward "components/_my-card.scss";</pre>
5555
</div>
5656
<p class="step-description">
5757
Once you've updated this file, you can save and close it. Since we've added our project Sass source directory to our gulpfile in the first part of the tutorial, it should already be compiling correctly!
@@ -65,7 +65,7 @@ <h3 class="step">Use USWDS core features in custom styles.</h3>
6565
We'll want to use USWDS design tokens in our stylesheets using USWDS style features like functions and mixins. To do this, lets add <strong>uswds-core</strong> to the top of our new stylesheet with the <strong>use</strong> Sass directive.
6666
</p>
6767
<div class="editor">
68-
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> assets/css/components/_my-card.scss</h4>
68+
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/components/_my-card.scss</h4>
6969
<pre class="add">@use "uswds-core" as *;</pre>
7070
</div>
7171

@@ -74,7 +74,7 @@ <h3 class="step">Add custom class and styles.</h3>
7474
Next lets create a custom class for our personalized component and use some USWDS utilities. We'll start by updating the background color of the card. We can use the <a href="https://designsystem.digital.gov/design-tokens/color/system-tokens/#using-color-tokens-2"><strong>color()</strong> function</a> to use color tokens in our CSS rules.
7575
</p>
7676
<div class="editor">
77-
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> assets/css/components/_my-card.scss</h4>
77+
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/components/_my-card.scss</h4>
7878
<pre class="add">.my-card .usa-card__container {
7979
background-color: color("yellow-10");
8080
}</pre>
@@ -83,7 +83,7 @@ <h4 class="filename"><span class="material-icons" aria-hidden="true">description
8383
After recompiling we can see our changes have taken effect. Let's refine this card a bit more by reducing the boldness of the header and adding bit more space before the call to action. We'll use <a href="https://designsystem.digital.gov/design-tokens/spacing-units/">units tokens</a> and <a href="https://designsystem.digital.gov/design-tokens/typesetting/font-weight/">font weight tokens</a> for this.
8484
</p>
8585
<div class="editor">
86-
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> assets/css/components/_my-card.scss</h4>
86+
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/components/_my-card.scss</h4>
8787
<pre class="blur">.my-card .usa-card__container {
8888
background-color: color("indigo-70v");
8989
}

0 commit comments

Comments
 (0)