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

fix: linting fixes #317

Merged
merged 3 commits into from
Sep 13, 2023
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
2 changes: 1 addition & 1 deletion src/wmcads/assets/sass/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
// get-color(primary, 50); by default it mixes with white
// If you add dark to the end it will mix black instead of white
// e.g. get-color(primary, 50, dark);
@function get-color($color, $percent: 0, $shade: $white) {
@function get-color($color, $percent: 0%, $shade: $white) {
// If shade is null, then by default set to white else set to shade selected
$shade: if($shade == dark, $black, $white);
$color: map-get($palettes, $color);
Expand Down
8 changes: 4 additions & 4 deletions src/wmcads/assets/sass/wmcads-grid/_grid-spacing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@
// The first and last items in the list will always have no padding on the outer facing sides
&:first-child,
&:nth-child(#{$col-count}n + 1) {
padding-right: $spacing-value * (($col-count - 1) / $col-count);
padding-right: $spacing-value * calc(($col-count - 1) / $col-count);
padding-left: 0;
}

&:nth-child(#{$col-count}n) {
padding-right: 0;
padding-left: $spacing-value * (($col-count - 1) / $col-count);
padding-left: $spacing-value * calc(($col-count - 1) / $col-count);
}

// Loops through the inner cols (from right to left) increasing the padding right,
// and decreasing the padding left.
@if $col-count - 2 > 0 {
@for $i from 1 through $col-count - 2 {
&:nth-child(#{$col-count}n - #{$i}) {
padding-right: $spacing-value * ($i / $col-count);
padding-left: $spacing-value * (1 - (($i + 1) / $col-count));
padding-right: $spacing-value * calc($i / $col-count);
padding-left: $spacing-value * (1 - (calc(($i + 1) / $col-count)));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/wmcads/components/breadcrumb/_breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

&:hover {
color: get-color(text, 30, dark);
color: get-color(text, 30%, dark);
}
}

Expand Down
30 changes: 15 additions & 15 deletions src/wmcads/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
cursor: pointer;

&:hover {
background-color: get-color(primary, 30, dark);
background-color: get-color(primary, 30%, dark);
}

&:active,
&:target,
&:focus,
&.wmcads-is--active {
outline: none;
background-color: get-color(primary, 50, dark);
background-color: get-color(primary, 50%, dark);
-webkit-appearance: none;
}

Expand All @@ -53,7 +53,7 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
background-color: $white;

&:hover {
background-color: get-color(primary, 90);
background-color: get-color(primary, 90%);
}

&:active,
Expand All @@ -63,7 +63,7 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
}

&.wmcads-is--active {
background-color: get-color(primary, 80);
background-color: get-color(primary, 80%);
}
}

Expand All @@ -72,14 +72,14 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
background-color: get-color(primary);

&:hover {
background-color: get-color(primary, 30, dark);
background-color: get-color(primary, 30%, dark);
}

&:active,
&:target,
&:focus,
&.wmcads-is--active {
background-color: get-color(primary, 50, dark);
background-color: get-color(primary, 50%, dark);
}
}

Expand All @@ -94,7 +94,7 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
}

&:hover {
background-color: get-color(primary, 90);
background-color: get-color(primary, 90%);
}

&:active,
Expand All @@ -104,7 +104,7 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
}

&.wmcads-is--active {
background-color: get-color(primary, 75);
background-color: get-color(primary, 75%);
}

// Secondary (disabled)
Expand All @@ -124,14 +124,14 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
background-color: get-color(cta);

&:hover {
background-color: get-color(cta, 30, dark);
background-color: get-color(cta, 30%, dark);
}

&:active,
&:target,
&:focus,
&.wmcads-is--active {
background-color: get-color(cta, 50, dark);
background-color: get-color(cta, 50%, dark);
}
}

Expand All @@ -140,14 +140,14 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
background-color: get-color(error);

&:hover {
background-color: get-color(error, 30, dark);
background-color: get-color(error, 30%, dark);
}

&:active,
&:target,
&:focus,
&.wmcads-is--active {
background-color: get-color(error, 50, dark);
background-color: get-color(error, 50%, dark);
}
}

Expand All @@ -159,14 +159,14 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
}

&:hover {
background-color: get-color(success, 30, dark);
background-color: get-color(success, 30%, dark);
}

&:active,
&:target,
&:focus,
&.wmcads-is--active {
background-color: get-color(success, 50, dark);
background-color: get-color(success, 50%, dark);
}
}

Expand Down Expand Up @@ -198,7 +198,7 @@ $btn-transition: ease-in-out background-color 0.2s, ease-in-out border 0.2s;
display: inline;
padding: 0;
border-radius: 0;
color: get-color(cta, 10, dark);
color: get-color(cta, 10%, dark);
background: none;
font-weight: bold;
text-decoration: underline;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

// On mouse-over, add a grey background color
&:hover .wmcads-fe-checkboxes__checkmark {
background-color: get-color(secondary, 70);
background-color: get-color(secondary, 70%);
}
}

Expand Down Expand Up @@ -49,7 +49,7 @@
color: get-color(text);

&:focus ~ .wmcads-fe-checkboxes__checkmark {
background-color: get-color(secondary, 70);
background-color: get-color(secondary, 70%);
}

// Show the checkmark when checked
Expand Down
4 changes: 2 additions & 2 deletions src/wmcads/components/form-elements/radios/_radios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// On mouse-over, add a grey background color
&:hover .wmcads-fe-radios__checkmark {
background-color: get-color(secondary, 70);
background-color: get-color(secondary, 70%);
}
}

Expand All @@ -39,7 +39,7 @@
opacity: 0;

&:focus ~ .wmcads-fe-radios__checkmark {
background-color: get-color(secondary, 70);
background-color: get-color(secondary, 70%);
}

// Show the checkmark when checked
Expand Down
2 changes: 1 addition & 1 deletion src/wmcads/components/in-text-step/_in-text-step.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

&__item {
position: relative;
padding-top: $size-xs / 2;
padding-top: calc($size-xs / 2);
padding-left: $size-xl;
list-style: none;
counter-increment: item;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
left: 0;
width: 100%;
height: 100%;
background: url("https://cdnpremium.blob.core.windows.net/cdn/wmcaassets/img/igDoughnut/igf-inclusive-growth-framework.svg") no-repeat;
background: url("../img/component-images/igDoughnut/igf-inclusive-growth-framework.svg") no-repeat;
background-size: contain;
}

Expand All @@ -44,7 +44,7 @@
&:hover ~ .wmcads-ig-doughnut-framework {
width: 100%;
height: 100%;
background: url("https://cdnpremium.blob.core.windows.net/cdn/wmcaassets/img/igDoughnut/igf-climate-resilience.svg") no-repeat;
background: url("../img/component-images/igDoughnut/igf-climate-resilience.svg") no-repeat;
background-size: contain;
}
}
Expand All @@ -56,7 +56,7 @@
&:hover ~ .wmcads-ig-doughnut-framework {
width: 100%;
height: 100%;
background: url("https://cdnpremium.blob.core.windows.net/cdn/wmcaassets/img/igDoughnut/igf-inclusive-economy.svg") no-repeat;
background: url("../img/component-images/igDoughnut/igf-inclusive-economy.svg") no-repeat;
background-size: contain;
}
}
Expand All @@ -68,7 +68,7 @@
&:hover ~ .wmcads-ig-doughnut-framework {
width: 100%;
height: 100%;
background: url("https://cdnpremium.blob.core.windows.net/cdn/wmcaassets/img/igDoughnut/igf-power-and-participation.svg") no-repeat;
background: url("../img/component-images/igDoughnut/igf-power-and-participation.svg") no-repeat;
background-size: contain;
}
}
Expand All @@ -80,7 +80,7 @@
&:hover ~ .wmcads-ig-doughnut-framework {
width: 100%;
height: 100%;
background: url("https://cdnpremium.blob.core.windows.net/cdn/wmcaassets/img/igDoughnut/igf-affordable-and-safe-places.svg") no-repeat;
background: url("../img/component-images/igDoughnut/igf-affordable-and-safe-places.svg") no-repeat;
background-size: contain;
}
}
Expand All @@ -92,7 +92,7 @@
&:hover ~ .wmcads-ig-doughnut-framework {
width: 100%;
height: 100%;
background: url("https://cdnpremium.blob.core.windows.net/cdn/wmcaassets/img/igDoughnut/igf-connected-communities.svg") no-repeat;
background: url("../img/component-images/igDoughnut/igf-connected-communities.svg") no-repeat;
background-size: contain;
}
}
Expand All @@ -104,7 +104,7 @@
&:hover ~ .wmcads-ig-doughnut-framework {
width: 100%;
height: 100%;
background: url("https://cdnpremium.blob.core.windows.net/cdn/wmcaassets/img/igDoughnut/igf-education-and-learning.svg") no-repeat;
background: url("../img/component-images/igDoughnut/igf-education-and-learning.svg") no-repeat;
background-size: contain;
}
}
Expand All @@ -116,7 +116,7 @@
&:hover ~ .wmcads-ig-doughnut-framework {
width: 100%;
height: 100%;
background: url("https://cdnpremium.blob.core.windows.net/cdn/wmcaassets/img/igDoughnut/igf-health-and-wellbeing.svg") no-repeat;
background: url("../img/component-images/igDoughnut/igf-health-and-wellbeing.svg") no-repeat;
background-size: contain;
}
}
Expand All @@ -128,7 +128,7 @@
&:hover ~ .wmcads-ig-doughnut-framework {
width: 100%;
height: 100%;
background: url("https://cdnpremium.blob.core.windows.net/cdn/wmcaassets/img/igDoughnut/igf-equality.svg") no-repeat;
background: url("../img/component-images/igDoughnut/igf-equality.svg") no-repeat;
background-size: contain;
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/wmcads/components/link/link/_link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
}

&:hover {
color: get-color(cta-active, 40, dark);
color: get-color(cta-active, 40%, dark);
}
}

h1,
h2,
h3 {
color: get-color(cta, 10, dark);
color: get-color(cta, 10%, dark);
}

&--with-chevron {
Expand Down Expand Up @@ -86,7 +86,7 @@ a {
}

&:hover::after {
color: get-color(cta-active, 40, dark);
color: get-color(cta-active, 40%, dark);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/wmcads/patterns/autocomplete/_autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

&:hover,
&:focus {
background-color: get-color(information, 80);
background-color: get-color(information, 80%);
box-shadow: none;
}

Expand Down
2 changes: 1 addition & 1 deletion src/wmcads/patterns/board-members/_board-members.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@

&-panels {
padding-top: 30px;
border-top: 1px solid get-color(secondary, 40);
border-top: 1px solid get-color(secondary, 40%);
}
}
1 change: 1 addition & 0 deletions src/wmcads/patterns/footer/_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const footerJs = () => {
// if tab is used open menu
const collapseButton = document.querySelectorAll('.wmcads-footer__collapse-button');

// eslint-disable-next-line no-restricted-syntax
for (const i of collapseButton) {
i.addEventListener('keydown', e => {
handleKeydown(e, e.keyCode);
Expand Down
6 changes: 3 additions & 3 deletions src/wmcads/patterns/footer/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

&:not(:last-child) {
margin-bottom: $size-xsm;
border-bottom: 1px solid get-color(secondary, 70);
border-bottom: 1px solid get-color(secondary, 70%);
}

p {
Expand All @@ -71,7 +71,7 @@
.wmcads-footer__heading {
margin-bottom: $size-md;
padding-bottom: $size-md;
border-bottom: 1px solid get-color(secondary, 70);
border-bottom: 1px solid get-color(secondary, 70%);
color: $white;

@media screen and (max-width: $breakpoint-md - 1) {
Expand Down Expand Up @@ -135,7 +135,7 @@
}
margin-top: $size-xsm;
padding-top: $size-md;
border-top: 1px solid get-color(secondary, 70);
border-top: 1px solid get-color(secondary, 70%);

.wmcads-footer__link,
.wmcads-footer__copyright {
Expand Down
Loading
Loading