Skip to content

Commit d026915

Browse files
authored
Issues 738 & 733 (#740)
* resolves #738 * Resolves #733 * update Buttons in yarn.lock * generalize btn selectors * update Buttons in yarn.lock
1 parent 4bc36ea commit d026915

File tree

5 files changed

+23
-24
lines changed

5 files changed

+23
-24
lines changed

src/assets/scss/boldgrid/_buttons.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
@if variable-exists( button-secondary-classes ) {
1717
.button-secondary,
18+
*:not( .menu-item ) > .button-secondary,
1819
.woocommerce .alt.button {
1920
.palette-primary & {
2021
@extend #{$button-secondary-classes};

src/assets/scss/boldgrid/_elements.scss

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,17 @@ blockquote {
7474
}
7575

7676
/* Support for button wrapping classes. */
77-
.main {
78-
.btn,
79-
.button-primary,
80-
.button-secondary {
81-
white-space: normal;
82-
height: unset !important;
83-
&:not( .btn-small ):not( .btn-tiny ) {
84-
min-height: 40px;
85-
}
86-
&:hover,
87-
&:focus {
88-
text-decoration: none;
89-
}
77+
.btn,
78+
.button-primary,
79+
.button-secondary {
80+
white-space: normal;
81+
height: unset !important;
82+
&:not( .btn-small ):not( .btn-tiny ) {
83+
min-height: 40px;
84+
}
85+
&:hover,
86+
&:focus {
87+
text-decoration: none;
9088
}
9189
}
9290

src/assets/scss/custom-color/color-classes.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,20 @@ $names: background background-color;
102102
@for $each from 1 through length( $colors ) {
103103
$reference: nth($colors, $color);
104104
&.color-#{$each}-link-color {
105-
a {
105+
a:not( .btn ) {
106106
color: #{nth($colors, $each)};
107107
}
108-
a:hover, a:focus, a:active, a.highlighted {
108+
a:not( .btn ):hover, a:not( .btn ):focus, a:not( .btn ):active, a:not( .btn ).highlighted {
109109
color: hover( nth($colors, $color), nth($colors, $each) );
110110
}
111111
}
112112
}
113113
@if variable-exists( palette-primary-neutral-color ) {
114114
&.color-neutral-link-color {
115-
a {
115+
a:not( .btn ) {
116116
color: $palette-primary-neutral-color;
117117
}
118-
a:hover, a:focus, a:active, a.highlighted {
118+
a:not( .btn ):hover, a:not( .btn ):focus, a:not( .btn ):active, a:not( .btn ).highlighted {
119119
color: hover( nth($colors, $color), $palette-primary-neutral-color );
120120
}
121121
}
@@ -147,19 +147,19 @@ $names: background background-color;
147147
.color#{$color}-#{nth( $names, $i )} {
148148
@for $each from 1 through length( $colors ) {
149149
&.color-#{$each}-link-color {
150-
a {
150+
a:not( .btn ) {
151151
color: #{nth($colors, $each)};
152152
}
153-
a:hover, a:focus, a:active, a.highlighted {
153+
a:not( .btn ):hover, a:not( .btn ):focus, a:not( .btn ):active, a:not( .btn ).highlighted {
154154
color: hover( nth($colors, $color), nth($colors, $each) );
155155
}
156156
}
157157
&.sidebar {
158158
&.color-#{$each}-link-color {
159-
a {
159+
a:not( .btn ) {
160160
color: #{nth($colors, $each)};
161161
}
162-
a:hover, a:focus, a:active, a.highlighted {
162+
a:not( .btn ):hover, a:not( .btn ):focus, a:not( .btn ):active, a:not( .btn ).highlighted {
163163
color: hover( nth($colors, $color), nth($colors, $each) );
164164
}
165165
}

src/includes/class-boldgrid-framework-links.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public function get_styles( $prefix ) {
168168
$footer_lightness = max( $footer_lightness, 0 );
169169
$footer_color_hover = $footer_ari_color->getNew( 'lightness', $footer_lightness )->toCSS( 'hsla' );
170170

171-
$css .= "#colophon .bgtfw-footer.footer-content *:not( .menu-item ) > a { text-decoration: ${decoration};}";
172-
$css .= "#colophon .bgtfw-footer.footer-content *:not( .menu-item ) > a:hover, .bgtfw-footer.footer-content *:not( .menu-item ) > a:focus {color: ${footer_color_hover};text-decoration: ${decoration_hover};}";
171+
$css .= "#colophon .bgtfw-footer.footer-content *:not( .menu-item ) > a:not( .btn ) { text-decoration: ${decoration};}";
172+
$css .= "#colophon .bgtfw-footer.footer-content *:not( .menu-item ) > a:not( .btn ):hover, .bgtfw-footer.footer-content *:not( .menu-item ) > a:not( .btn ):focus {color: ${footer_color_hover};text-decoration: ${decoration_hover};}";
173173
}
174174
}
175175
}

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@
13461346

13471347
"Buttons@https://github.com/boldgrid/Buttons#crio-buttons":
13481348
version "3.0.0"
1349-
resolved "https://github.com/boldgrid/Buttons#609475046d4372ec6b8881baadff536dbadce1cd"
1349+
resolved "https://github.com/boldgrid/Buttons#0c98eef82d7193b949f2ae6f6584840fe0c8f4e1"
13501350
dependencies:
13511351
grunt "^0.4.5"
13521352
grunt-saucelabs "^8.3.2"

0 commit comments

Comments
 (0)