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

Sass-> CSS Research #574

Closed
wants to merge 15 commits into from
Closed
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
14 changes: 7 additions & 7 deletions src/_sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ a:focus {
}

blockquote {
background-color: $gray-light;
background-color: var(--gray-light);
border-radius: $border-radius-lg;
border-width: 0;
padding: 2rem;
Expand All @@ -40,7 +40,7 @@ blockquote {
figure {
background: none;
border: none;
margin-bottom: map-get($spacers, 3);
margin-bottom: 1rem;

figcaption {
font-style: italic;
Expand Down Expand Up @@ -71,7 +71,7 @@ h5 {
h1,
h2,
h3 {
font-family: $headings-font-family;
font-family: var(--headings-font-family);
}

h4,
Expand Down Expand Up @@ -122,20 +122,20 @@ h5,
}

.subtext {
color: $primary;
color: var(--bs-primary);
font-size: calc(14rem / 16);
font-weight: 500;
}

hr {
margin-bottom: map-get($spacers, 4);
margin-top: map-get($spacers, 4);
margin-bottom: 1.5rem;
margin-top: 1.5rem;
width: 100%;
}

.youtube {
height: 315px;
margin-bottom: map-get($spacers, 3);
margin-bottom: 1rem;
margin-left: auto;
margin-right: auto;
width: 100%;
Expand Down
18 changes: 7 additions & 11 deletions src/_sass/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,23 @@
$mm-dark-tan: rgb(246, 243, 237);

.bg-blue-lightest {
background-color: $blue-lightest;
background-color: var(--cal-itp-background-blue);
}

.bg-dark-tan {
background-color: $mm-dark-tan;
}

.bg-gray-light {
background-color: $gray-light;
}

.bg-gray-lightest {
background-color: $gray-lightest;
}

.bg-dark-blue {
background-color: $dark-blue;
background-color: var(--cal-itp-dark-blue);
}

.bg-blue-lightest {
background-color: $blue-lightest;
background-color: var(--cal-itp-background-blue);
}

// Text
Expand Down Expand Up @@ -55,10 +51,10 @@ $mm-dark-tan: rgb(246, 243, 237);

.btn.btn-dark-blue-inverted {
background-color: #ffffff;
color: $dark-blue;
color: var(--cal-itp-dark-blue);
&:hover {
background-color: $gray-1;
color: $dark-blue;
color: var(--cal-itp-dark-blue);
}
}

Expand Down Expand Up @@ -110,12 +106,12 @@ $mm-dark-tan: rgb(246, 243, 237);
// Tables

.table-dark-blue {
background-color: $dark-blue !important;
background-color: var(--cal-itp-dark-blue) !important;
box-shadow: none !important;
}

.border-dark-blue {
border-color: $dark-blue !important;
border-color: var(--cal-itp-dark-blue) !important;
}

.table-sticky-column {
Expand Down
47 changes: 25 additions & 22 deletions src/_sass/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
// Variables

$headings-font-family: "Raleway", sans-serif;
$text-color: #323a45;
$headings-color: $text-color;
$code-color: $text-color;

// Colors

$blue-lightest: #f5f9fb;
$gray-light: #d1dee3;
$gray-lightest: #f3f3f4;
$hover-color: #035376;

// New colors from 2023 / Figma

$primary: #046b99;
$primary-black: #212121;
$dark-blue: #225173;

$gray-1: #eeeeee;
$gray-3: #8f9399;
$gray-4: #60656b;
Expand All @@ -30,7 +22,7 @@ $focus: #99b5fa;
$backgroundColor: #fff;
$headerBackgroundColor: $backgroundColor;
$rowBorderColor: #cccccc;
$rowHoverBackground: $blue-lightest;
$rowHoverBackground: #f5f9fb;
$table-border-color: $rowBorderColor;

// Down arrow icon used in selects and table sorts
Expand All @@ -41,30 +33,41 @@ $custom-select-indicator: url('data:image/svg+xml,<svg width="12" height="7" vie
// Bootstrap CSS Variable Overrides

:root {
--bs-primary: #{$primary};
--bs-body-color: #{$primary-black};
--bs-link-color: #{$primary};
--bs-primary: #046b99;
--bs-body-color: #212121;
--bs-link-color: #046b99;
--bs-body-font-family: "Poppins", sans-serif;
--bs-link-hover-color: #{$dark-blue};
--bs-link-hover-color: #225173;
--headings-font-family: "Raleway", sans-serif;
--gray-light: #d1dee3;
--cal-itp-dark-blue: #225173;
--cal-itp-background-blue: #f5f9fb;
--newsletter-btn-hover-color: #035376;
--newsletter-btn-hover-border-color: #035376;
}

.btn-primary {
--bs-btn-bg: #{$primary};
--bs-btn-border-color: #{$primary};
--bs-btn-hover-bg: #{$dark-blue};
--bs-btn-bg: #046b99;
--bs-btn-border-color: #046b99;
--bs-btn-hover-bg: #225173;
--bs-btn-hover-color: #ffffff;
--bs-btn-hover-border-color: #{$dark-blue};
--bs-btn-active-bg: #{$dark-blue};
--bs-btn-active-border-color: #{$dark-blue};
--bs-btn-hover-border-color: #225173;
--bs-btn-active-bg: #225173;
--bs-btn-active-border-color: #225173;
}

.btn-outline-primary {
--bs-btn-color: #{$primary};
--bs-btn-border-color: #{$primary};
--bs-btn-color: #046b99;
--bs-btn-border-color: #046b99;
--bs-btn-hover-bg: transparent;
--bs-btn-hover-color: #035376;
--bs-btn-hover-border-color: #035376;
--bs-btn-active-bg: #035376;
--bs-btn-active-border-color: #035376;
}

.dropdown-menu {
--bs-dropdown-border-radius: 0;
--bs-dropdown-link-hover-bg: #f7f8fa;
--bs-dropdown-link-active-bg: #{$gray-1};
--bs-dropdown-link-active-bg: #eeeeee;
}
20 changes: 7 additions & 13 deletions src/_sass/components/_filterable-table.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
.filterable-table-container {}

.filterable-table__pills {
width: 100%;

.pill {
margin-bottom: map-get($spacers, 3);
margin-left: map-get($spacers, 2);

&:first-child {
margin-left: 0;
}
}
}

// These are magic numbers that probably can be replaced by some CSS magic
.filterable-table__pills .pill {
margin-bottom: 1rem;
margin-left: 0.5rem;
}
.filterable-table__pills .pill:first-child {
margin-left: 0;
}
.filterable-table__pills--provider-map {
left: 15px;
position: absolute;
Expand Down
54 changes: 23 additions & 31 deletions src/_sass/components/_footnotes.scss
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
a.footnote-link {
color: currentColor;
display: inline-flex;

&::before {
content: '[';
}

&::after {
content: ']';
}
}

}
a.footnote-link::before {
content: "[";
}
a.footnote-link::after {
content: "]";
}
.footnote-listing {
font-size: 0.85rem;
list-style: none;

li:target {
background-color: yellow;

// Stupid overrides for some very invasive CA Gov styles
&::before {
height: auto;
margin: 0;
}
}

li {
position: relative;
}

span.footnote-number {
position: absolute;
right: 100%;
white-space: nowrap;
margin-right: .4em;
}
}
.footnote-listing li:target {
background-color: yellow;
}
.footnote-listing li:target::before {
height: auto;
margin: 0;
}
.footnote-listing li {
position: relative;
}
.footnote-listing span.footnote-number {
position: absolute;
right: 100%;
white-space: nowrap;
margin-right: 0.4em;
}
Loading