-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
date stacked component initial commit (#373)
* date stacked component initial commit * CC FIXUP * CC FIXUP * clean up * updated default styles for component based on new design * no bg variant * styleguide responsiveness * max width and BEM FIXUP * incorporate time tag * Update date-stacked.twig * fixup! color maps * fixup! build. * Update date-stacked.twig
- Loading branch information
1 parent
799dae3
commit 4a07d44
Showing
8 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
core/src/scss/components/date-stacked/_date-stacked--no-background.scss
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,11 @@ | ||
@charset "UTF-8"; | ||
|
||
// | ||
// Date Stacked No Background | ||
// | ||
|
||
.su-date-stacked--no-background { | ||
@include padding(0); | ||
background: none; | ||
color: color(text--high-contrast); | ||
} |
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,39 @@ | ||
@charset "UTF-8"; | ||
|
||
// | ||
// Date Stacked | ||
// | ||
// Abbreviated month stacked on top of numerical day of the month. | ||
// | ||
// .su-date-stacked--no-background - Black type on transparent background | ||
// | ||
// Markup: ../templates/components/date-stacked/date-stacked.twig | ||
// | ||
// Style guide: Components.Date Stacked | ||
// | ||
.su-date-stacked { | ||
@include modular-spacing('padding', 0); | ||
background: color(bg--reverse); | ||
color: color(text--reverse); | ||
max-width: 87px; | ||
text-align: center; | ||
|
||
@include grid-media-only('md') { | ||
max-width: 101px; | ||
} | ||
|
||
@include grid-media-only('2xl') { | ||
max-width: 105px; | ||
} | ||
|
||
.su-date-stacked__month { | ||
@include big-paragraph; | ||
display: block; | ||
} | ||
|
||
.su-date-stacked__day { | ||
@include types; | ||
@include type-b; | ||
display: block; | ||
} | ||
} |
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,9 @@ | ||
@charset "UTF-8"; | ||
|
||
/// | ||
/// ROLL UP | ||
/// | ||
|
||
@import | ||
'date-stacked', | ||
'date-stacked--no-background'; |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"month_of_year": "Oct", | ||
"day_of_month": "31" | ||
} |
25 changes: 25 additions & 0 deletions
25
core/src/templates/components/date-stacked/date-stacked.twig
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,25 @@ | ||
{# | ||
/** | ||
* @file | ||
* Date Stacked Component. | ||
* | ||
* Abbreviated month stacked on top of numerical day of the month. | ||
* | ||
* Available variables: | ||
* - attributes: For additional HTML attributes not already provided. | ||
* - modifier_class: Additional css classes to change look and behaviour. | ||
* - month_of_year: The abbreviated month of the year. | ||
* - day_of_month: The day of the month in digit form. | ||
*/ | ||
#} | ||
|
||
<div{{ attributes }} class="su-date-stacked {{ modifier_class }}"> | ||
{% if month_of_year is not empty %} | ||
<span class="su-date-stacked__month">{{ month_of_year }}</span> | ||
{% endif %} | ||
|
||
{% if day_of_month is not empty %} | ||
<span class="su-date-stacked__day">{{ day_of_month }}</span> | ||
{% endif %} | ||
|
||
</div> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.