Skip to content

Commit 4509339

Browse files
author
Salma Alam-Naylor
committed
Made a mixin for main button cta
1 parent cd934fb commit 4509339

File tree

4 files changed

+38
-32
lines changed

4 files changed

+38
-32
lines changed

apps/fretonator-web/src/app/common/footer/footer.component.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
@include text_link();
4343
color: var(--yellow);
4444
border-color: var(--yellow);
45+
46+
@include focus_accessible();
4547
}
4648

4749
.footer__copyright {
@@ -55,10 +57,6 @@
5557
}
5658

5759
.footer__viewGithub {
58-
color: var(--offwhite);
59-
font-size: pxToRem(12);
60-
display: block;
60+
@include hard_button_base();
6161
margin-bottom: pxToRem($grid-unit * 2);
62-
63-
@include focus_accessible($focus_box_shadow_color_alt);
6462
}

apps/fretonator-web/src/app/common/fretonator/scale-map/scale-map.component.scss

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -167,35 +167,12 @@
167167
}
168168

169169
.infoHighlight {
170-
border-radius: var(--border-radius-button);
170+
border-radius: var(--border-radius-chip);
171171
padding: pxToRem($grid-unit / 4) pxToRem($grid-unit * 2);
172172
color: var(--black);
173173
background-color: var(--peach);
174174
}
175175

176176
.actionButton {
177-
border-radius: var(--border-radius-button);
178-
border: pxToRem(2) solid var(--offwhite);
179-
text-transform: uppercase;
180-
font-family: var(--font-family-main);
181-
font-size: pxToRem(18);
182-
margin-left: auto;
183-
margin-right: auto;
184-
display: inline-block;
185-
background-color: transparent;
186-
padding: pxToRem($grid-unit) pxToRem($grid-unit * 2);
187-
color: var(--offwhite);
188-
text-decoration: none;
189-
cursor: pointer;
190-
transition: all 0.2s ease-in-out;
191-
font-weight: var(--font-weight-bold);
192-
letter-spacing: var(--letter-spacing-display);
193-
margin-top: pxToRem($grid-unit * 3);
194-
195-
@include focus_accessible();
196-
197-
&:hover {
198-
border-color: var(--yellow);
199-
color: var(--yellow);
200-
}
177+
@include hard_button_base();
201178
}

apps/fretonator-web/src/styles.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030

3131
--border-width-base: 1px;
3232
--border-radius-base: 2px;
33-
--border-radius-button: 16px;
33+
--border-radius-chip: 16px;
34+
--border-radius-button: 0;
3435

3536
--border-width-button: 2px;
3637

apps/fretonator-web/src/styles/_mixins.scss

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
border-style: solid;
4242
border-color: var(--black);
4343
background-color: var(--white);
44-
border-radius: var(--border-radius-button);
44+
border-radius: var(--border-radius-chip);
4545
padding: pxToRem(4) pxToRem(8);
4646
cursor: pointer;
4747
font-weight: var(--font-weight-bold);
@@ -52,3 +52,33 @@
5252

5353
@include focus_accessible();
5454
}
55+
56+
@mixin hard_button_base(
57+
$foregroundColor: var(--offwhite),
58+
$backgroundColor: var(--black)) {
59+
border-radius: var(--border-radius-button);
60+
border: pxToRem(2) solid $foregroundColor;
61+
text-transform: uppercase;
62+
font-family: var(--font-family-main);
63+
font-size: pxToRem(18);
64+
margin-left: auto;
65+
margin-right: auto;
66+
display: inline-block;
67+
background-color: $backgroundColor;
68+
padding: pxToRem($grid-unit) pxToRem($grid-unit * 2);
69+
color: $foregroundColor;
70+
text-decoration: none;
71+
cursor: pointer;
72+
transition: all 0.2s ease-in-out;
73+
font-weight: var(--font-weight-bold);
74+
letter-spacing: var(--letter-spacing-display);
75+
margin-top: pxToRem($grid-unit * 3);
76+
box-shadow: 8px 8px 0 0 $foregroundColor;
77+
78+
@include focus_accessible();
79+
80+
&:hover {
81+
border-color: var(--yellow);
82+
color: var(--yellow);
83+
}
84+
}

0 commit comments

Comments
 (0)