Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VOTE-2047: Style felony module #787

Merged
merged 9 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions web/themes/custom/votegov/img/svg/map-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/themes/custom/votegov/src/sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ $ac-cool-light: #0AAAE2; // cyan-30v

// Background Colors.
$bg-light: #F0F0F0; // gray-cool-2
$bg-secondary-light: #F7F9FA;
$bg-light-medium: #D3D3D3; // gray-cool-20 is this just for the horizontal rule?
$bg-light-cool: #E2EDF2; // blue-warm-10
$bg-light-warm: #E7E5DD; // hero-background
Expand Down
1 change: 1 addition & 0 deletions web/themes/custom/votegov/src/sass/components/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
@forward "accordion-group";
@forward "usagov-partner";
@forward "a11y-toolbar";
@forward "double-deck-card";
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
@use "uswds-core" as *;
@use "variables" as *;
@use "mixins" as *;

.vote-double-deck-card {
--vote-ddc-bg: #{$bg-secondary-light};
--vote-ddc-icon-fill: #{$base-dark};
--vote-ddc-body-secondary-bg: #{$bg-light-cool};
@include vote-block-margin-y;
background-color: var(--vote-ddc-bg);
border: 1px solid $base-dark;

[data-theme="contrast"] & {
--vote-ddc-bg: #{$base-white};
--vote-ddc-icon-fill: #{$bg-high-contrast};
--vote-ddc-body-secondary-bg: #{$bg-light};
}
}

.vote-double-deck-card__primary {
@include u-padding(4);

@include at-media('tablet') {
@include u-display('flex');
gap: 1.5rem;
}
}

.vote-double-deck-card__icon {
@include u-margin-bottom(3);
@include u-text-align('center');

svg {
fill: var(--vote-ddc-icon-fill);
}
}

.vote-double-deck-card__heading {
@include u-font-size('serif', 9);
@include u-line-height('serif', 4);
}

.vote-double-deck-card__body {
@include u-padding-y(3);

ul {
@include u-margin(0);

&:has(:nth-child(6)) {
@include at-media('desktop-lg') {
column-count: 2;
}

@include at-media-max('tablet-lg') {
column-count: 2;
}

@include at-media-max('tablet') {
column-count: unset;
}
}
}
}

.vote-double-deck-card__body_secondary {
@include u-padding(4);
@include u-font-family('sans');
background-color: var(--vote-ddc-body-secondary-bg);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{#
/**
* @file
* Default theme implementation to display a paragraph: Double deck card
*/
#}

<div class="vote-double-deck-card">
<div class="vote-double-deck-card__primary">
<div class="vote-double-deck-card__icon">
{{ source(directory ~ '/img/svg/map-icon.svg' ) }}
</div>
<div class="vote-double-deck-card__text">
<h3 class="vote-double-deck-card__heading">{{ content.field_heading | field_value }}</h3>
<div class="vote-double-deck-card__body">{{ content.field_body | field_value }}</div>
</div>
</div>
<div class="vote-double-deck-card__body_secondary">{{ content.field_body_secondary | field_value}}</div>
</div>