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

Migrate Less color variables to CSS custom properties (variables) #8171

Merged
merged 10 commits into from
Mar 29, 2024
8 changes: 4 additions & 4 deletions cfgov/unprocessed/apps/filing-instruction-guide/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

.o-fig_heading {
a {
color: @black;
color: var(--black);
word-break: break-word;
}
}
Expand All @@ -85,7 +85,7 @@
&::after {
display: inline-block;
content: '';
border-top: 2px solid @gray-50;
border-top: 2px solid var(--gray-50);
width: calc(100% + 30px);
margin: unit(45px / @base-font-size-px, em) 0 0
unit(-30px / @base-font-size-px, em);
Expand Down Expand Up @@ -179,9 +179,9 @@
}
}
.ctrl-f-search-result {
border-bottom: 1px solid @gray-40;
border-bottom: 1px solid var(--gray-40);
a {
color: @black;
color: var(--black);
&:focus {
.a-text-input.focus();
}
Expand Down
22 changes: 11 additions & 11 deletions cfgov/unprocessed/apps/financial-well-being/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.save-links {
padding-bottom: 15px;
border-bottom: 1px solid @gray-40;
border-bottom: 1px solid var(--gray-40);
margin: 30px 0;
text-align: right;
}
Expand All @@ -16,7 +16,7 @@

.score-box {
height: 150px;
border-color: @black;
border-color: var(--black);
border-style: solid;
position: absolute;
top: 0;
Expand Down Expand Up @@ -45,7 +45,7 @@
.spectrum_x-label {
padding-top: 5px;
padding-left: 5px;
border-left: 1px solid @gray-40;
border-left: 1px solid var(--gray-40);
position: absolute;
font-size: unit(12px / @base-font-size-px, em);
list-style: none;
Expand Down Expand Up @@ -81,15 +81,15 @@

.comparison-chart_toggle-button {
margin-bottom: 5px;
background-color: @pacific-20;
color: @black;
background-color: var(--pacific-20);
color: var(--black);
font-size: unit(14px / @base-font-size-px, em);
}

.comparison-chart_toggle-button:hover,
.comparison-chart_toggle-button:focus,
.comparison-chart_toggle-button__selected {
background-color: @pacific-60;
background-color: var(--pacific-60);
}

.comparison-chart_title {
Expand All @@ -116,7 +116,7 @@

.comparison-chart_list dd {
width: 65%;
border-bottom: 1px solid @gray-40;
border-bottom: 1px solid var(--gray-40);
position: relative;
bottom: 0.25em;
}
Expand All @@ -138,9 +138,9 @@

.comparison-chart_source {
padding-top: 15px;
border-top: 1px solid @gray-40;
border-top: 1px solid var(--gray-40);
margin-top: 30px;
color: @gray-80;
color: var(--gray-80);
font-size: unit(12px / @base-font-size-px, em);
}

Expand All @@ -149,7 +149,7 @@
.o-scale {
+ .o-scale {
padding-top: unit(30px / @base-font-size-px, em);
border-top: 1px solid @gray-40;
border-top: 1px solid var(--gray-40);
margin-top: unit(30px / @base-font-size-px, em);
}

Expand All @@ -165,7 +165,7 @@
position: relative;

&:not(:last-child):before {
border-top: 1px solid @gray-80;
border-top: 1px solid var(--gray-80);

position: absolute;
top: 11px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.hud-search-container {
background: @gray-5;
background: var(--gray-5);
}

.hud-search-container_text {
Expand Down
24 changes: 12 additions & 12 deletions cfgov/unprocessed/apps/form-explainer/css/form-explainer.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@

@gold-dk: #ff9e1b; // gold
@gold-md: #ffce8d; // gold-60
@gold-lt: #ffd8a3;
@gold-lt: #ffd8a3; // gold-50
@gold-bg: #fff8f0;

@red-dk: #d486b2;
@red-md: #dc9cbf;
@red-lt: #f0d8e2;
@red-dk: #d486b2; // purple-60
@red-md: #dc9cbf; // purple-50
@red-lt: #f0d8e2; // purple-20
@red-bg: #f9f6f6;

@blue-dk: #6f88b2;
@blue-md: #9daecc;
@blue-lt: #d3daeb;
@blue-dk: #6f88b2; // navy-70
@blue-md: #9daecc; // navy-50
@blue-lt: #d3daeb; // navy-20
@blue-bg: #f4f7fa;

@teal-dk: #579695; // teal-80
@teal-md: #70a6a5;
@teal-md: #70a6a5; // teal-70
@teal-lt: #d4e7e6; // teal-20
@teal-bg: #f2f8f8;

Expand All @@ -39,7 +39,7 @@
.image-map_image {
display: block;
box-sizing: border-box;
border: 1px solid @black;
border: 1px solid var(--black);
}

.image-map_overlay {
Expand Down Expand Up @@ -94,7 +94,7 @@
});

.o-expandable_cues {
color: @black;
color: var(--black);
}
}

Expand Down Expand Up @@ -152,7 +152,7 @@
display: block;
width: 20%;
text-align: right;
color: @gray-80;
color: var(--gray-80);
}

.explain {
Expand Down Expand Up @@ -258,7 +258,7 @@
&:focus,
&:hover,
&:active {
color: @black;
color: var(--black);
border-bottom-width: 0;
}
}
Expand Down
12 changes: 6 additions & 6 deletions cfgov/unprocessed/apps/know-before-you-owe/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

.kbyo-professional-resources,
.kbyo-footer {
background-color: @gray-5;
border-bottom: 1px solid @gray-10;
border-top: 1px solid @gray-10;
background-color: var(--gray-5);
border-bottom: 1px solid var(--gray-10);
border-top: 1px solid var(--gray-10);
padding-top: unit(60px / @base-font-size-px, rem);
padding-bottom: unit(60px / @base-font-size-px, rem);
}
Expand Down Expand Up @@ -42,8 +42,8 @@
}

.kbyo-compare-tiles img {
border: 1px solid @gray-30;
box-shadow: 3px 3px 3px @gray-30;
border: 1px solid var(--gray-30);
box-shadow: 3px 3px 3px var(--gray-30);
display: inline-block;
zoom: 1;
margin: 10px 10px 0 0;
Expand Down Expand Up @@ -74,5 +74,5 @@

// Timeline page.
.kbyo-timeline-page__date {
color: @gray-90;
color: var(--gray-90);
}
4 changes: 2 additions & 2 deletions cfgov/unprocessed/apps/owning-a-home/css/brand-footer.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
========================================================================== */

.brand-footer {
background-color: @gray-5;
border-top: 1px solid @gray-40;
background-color: var(--gray-5);
border-top: 1px solid var(--gray-40);

&_wrapper {
box-sizing: border-box;
Expand Down
8 changes: 4 additions & 4 deletions cfgov/unprocessed/apps/owning-a-home/css/brand-header.less
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// TODO: Remove this code when owning-a-home is migrated Wagtail.
.brand-header {
background-color: @gray-5;
background-color: var(--gray-5);
padding-top: 15px;
padding-bottom: 15px;
border-bottom: 1px solid @gray-40;
border-bottom: 1px solid var(--gray-40);

&__1-2-container {
padding: 15px;
.respond-to-min(799px, {
.grid_column( 6) ;
border: 0;
&:last-child {
border-left: 1px solid @gray-40;
border-left: 1px solid var(--gray-40);
}
}
);
Expand All @@ -23,7 +23,7 @@

&__1-2-container-with-icon {
.brand-header__icon {
color: @green;
color: var(--green);
font-size: 2.5em;
text-align: center;
position: absolute;
Expand Down
Loading
Loading