-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from UrbanInstitute/colors
Add color ultility module
- Loading branch information
Showing
10 changed files
with
609 additions
and
91 deletions.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"useTabs": true, | ||
"tabWidth": 2, | ||
"singleQuote": false, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,92 +1,92 @@ | ||
<script> | ||
import "$lib/style/app.css"; | ||
/** | ||
* @type {string} Scorecard value | ||
*/ | ||
export let value; | ||
/** | ||
* @type {string} Scorecard label | ||
*/ | ||
export let label; | ||
/** | ||
* @type {string} Scorecard value | ||
*/ | ||
export let value; | ||
/** | ||
* @type {string} Scorecard label | ||
*/ | ||
export let label; | ||
</script> | ||
|
||
<div class="scorecard-container"> | ||
<!-- scorecard value --> | ||
{#if value} | ||
<div class="scorecard-number"> | ||
<div class="scorecard-number-inner"> | ||
{value} | ||
</div> | ||
</div> | ||
{/if} | ||
<!-- scorecard label --> | ||
{#if label} | ||
<div class="scorecard-text-group font-light"> | ||
<div class="scorecard-text"> | ||
{label} | ||
</div> | ||
</div> | ||
{/if} | ||
<!-- scorecard value --> | ||
{#if value} | ||
<div class="scorecard-number"> | ||
<div class="scorecard-number-inner"> | ||
{value} | ||
</div> | ||
</div> | ||
{/if} | ||
<!-- scorecard label --> | ||
{#if label} | ||
<div class="scorecard-text-group font-light"> | ||
<div class="scorecard-text"> | ||
{label} | ||
</div> | ||
</div> | ||
{/if} | ||
</div> | ||
|
||
<style> | ||
.scorecard-container { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 2px; | ||
max-height: var(--spacing-20); | ||
height: var(--spacing-20); | ||
} | ||
.scorecard-container { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 2px; | ||
max-height: var(--spacing-20); | ||
height: var(--spacing-20); | ||
} | ||
.scorecard-number { | ||
display: flex; | ||
align-items: center; | ||
font-size: var(--font-size-4xl); | ||
font-weight: var(--font-weight-bold); | ||
height: var(--spacing-20); | ||
color: var(--color-white); | ||
background-color: var(--color-blue-shade-darker); | ||
padding: 0 1rem; | ||
text-decoration: underline; | ||
text-underline-offset: var(--spacing-2); | ||
text-decoration-color: var(--color-blue); | ||
text-decoration-thickness: var(--spacing-1); | ||
} | ||
.scorecard-number-inner { | ||
transform: translateY(-6px); | ||
} | ||
.scorecard-number { | ||
display: flex; | ||
align-items: center; | ||
font-size: var(--font-size-4xl); | ||
font-weight: var(--font-weight-bold); | ||
height: var(--spacing-20); | ||
color: var(--color-white); | ||
background-color: var(--color-blue-shade-darker); | ||
padding: 0 1rem; | ||
text-decoration: underline; | ||
text-underline-offset: var(--spacing-2); | ||
text-decoration-color: var(--color-blue); | ||
text-decoration-thickness: var(--spacing-1); | ||
} | ||
.scorecard-number-inner { | ||
transform: translateY(-6px); | ||
} | ||
.scorecard-text-group { | ||
display: flex; | ||
align-items: center; | ||
height: var(--spacing-20); | ||
background-color: var(--color-gray-shade-light); | ||
} | ||
.scorecard-text-group { | ||
display: flex; | ||
align-items: center; | ||
height: var(--spacing-20); | ||
background-color: var(--color-gray-shade-light); | ||
} | ||
.scorecard-text { | ||
font-size: var(--font-size-3xl); | ||
overflow: nowrap; | ||
padding: 0 var(--spacing-4); | ||
text-transform: uppercase; | ||
} | ||
.scorecard-text { | ||
font-size: var(--font-size-3xl); | ||
overflow: nowrap; | ||
padding: 0 var(--spacing-4); | ||
text-transform: uppercase; | ||
} | ||
/* on smaller screens, reduce font size so there's no vertical stacking */ | ||
@media screen and (max-width: 450px) { | ||
.scorecard-text { | ||
font-size: var(--font-size-2xl); | ||
} | ||
} | ||
/* on smaller screens, reduce font size so there's no vertical stacking */ | ||
@media screen and (max-width: 450px) { | ||
.scorecard-text { | ||
font-size: var(--font-size-2xl); | ||
} | ||
} | ||
@media screen and (max-width: 376px) { | ||
.scorecard-number { | ||
height: var(--spacing-16); | ||
} | ||
.scorecard-container { | ||
height: var(--spacing-16); | ||
max-height: var(--spacing-16); | ||
} | ||
.scorecard-text-group { | ||
height: var(--spacing-16); | ||
} | ||
} | ||
@media screen and (max-width: 376px) { | ||
.scorecard-number { | ||
height: var(--spacing-16); | ||
} | ||
.scorecard-container { | ||
height: var(--spacing-16); | ||
max-height: var(--spacing-16); | ||
} | ||
.scorecard-text-group { | ||
height: var(--spacing-16); | ||
} | ||
} | ||
</style> |
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
Oops, something went wrong.