generated from uswds/uswds-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin building out part 2 instructions
- Loading branch information
Showing
4 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
<div class="usa-card position-sticky top-1"> | ||
<div class="usa-card__container"> | ||
<div class="usa-card__header"> | ||
<h2 class="usa-card__heading">Card component</h2> | ||
</div> | ||
<div class="usa-card__body"> | ||
<p> | ||
This is a standard USWDS card component! Customize me! | ||
</p> | ||
</div> | ||
<div class="usa-card__footer"> | ||
<a href="#" class="usa-button">Card button</a> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<section class="part intro"> | ||
<h2>Theming, customizing, extending</h2> | ||
<p class="subhed">Take USWDS and make it your own.</p> | ||
<p class="subhed">In this section of the tutorial, you'll expand on theming components. Then you'll learn creating custom project styles for our components. Finally, you'll exend a component to create a custom component!</p> | ||
<h3>Contents</h3> | ||
<ul class="contents"> | ||
<li> | ||
<a class="contents-item" href="#part-one"> | ||
<span class="contents-part">1</span> | ||
<span class="contents-title">Theming USWDS Components</span> | ||
<span class="material-icons right" aria-hidden="true">arrow_forward</span> | ||
</a> | ||
</li> | ||
<li> | ||
<a class="contents-item" href="#part-one"> | ||
<span class="contents-part">2</span> | ||
<span class="contents-title">Writing custom styles</span> | ||
<span class="material-icons right" aria-hidden="true">arrow_forward</span> | ||
</a> | ||
</li> | ||
<li> | ||
<a class="contents-item" href="#part-one"> | ||
<span class="contents-part">3</span> | ||
<span class="contents-title">Extending USWDS components</span> | ||
<span class="material-icons right" aria-hidden="true">arrow_forward</span> | ||
</a> | ||
</li> | ||
</ul> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
\<section class="part one" id="part-one"> | ||
<h2><span>Part one</span> Customize card using theme settings</h2> | ||
<p> | ||
We’ll start customizing our card component by using the available theme settings. | ||
</p> | ||
<h3 class="step">View available theme settings.</h3> | ||
<p class="step-description"> | ||
Visit the <a href="https://designsystem.digital.gov/components/card/#usability-guidance">USWDS Card component settings table</a> to see a list of available settings. | ||
</p> | ||
<h3 class="step">Customize border settings</h3> | ||
<p class="step-description"> | ||
Let's start but updating the border color and radius to be more pronounced. | ||
</p> | ||
<div class="editor"> | ||
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/_uswds-theme.scss</h4> | ||
<pre class="blur">@use "uswds-core" with ( | ||
... | ||
</pre><pre class="add"> $theme-card-border-color: "indigo-30", | ||
$theme-card-border-radius: 3, | ||
$theme-card-border-width: 1</pre> | ||
<pre class="blur">);</pre> | ||
</div> | ||
<h3 class="step">Customize type settings</h3> | ||
<p class="step-description"> | ||
Next lets use the available font and typeset settings to customize how our card information is presented. | ||
</p> | ||
<div class="editor"> | ||
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/_uswds-theme.scss</h4> | ||
<pre class="blur">@use "uswds-core" with ( | ||
... | ||
$theme-card-border-color: "indigo-30", | ||
$theme-card-border-radius: 3, | ||
$theme-card-border-width: 1,</pre> | ||
<pre class="add"> $theme-card-font-family: "serif" | ||
$theme-card-header-typeset: "sans", "xl", 2.5 | ||
</pre><pre class="blur">);</pre> | ||
</div> | ||
<p class="step-description"> | ||
Save, wait for he Sass to compile, and do a hard reload and you'll see the the updated border and font settings shape the card component! All without having to write any custom CSS. | ||
</p> | ||
|
||
<p class="step-description"> | ||
But maybe there are additional changes your team would like to make that are not available in theme settings. In the next section we'll take a look at USWDS. | ||
</p> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters