Skip to content

Commit 7c0a688

Browse files
Merge pull request #81 from bigboxwc/release/1.13.0
release/1.13.0
2 parents 879535c + dd1cc9d commit 7c0a688

30 files changed

+270
-94
lines changed

CHANGELOG.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
## [1.13.0] - 2018-08-14
2+
3+
### New
4+
5+
- Improve keyboard accessibility user interface.
6+
- Allow CSS color variables to be overridden in a child theme.
7+
- Gutenberg 3.5 compatibility (including custom font size support).
8+
19
## [1.12.1] - 2018-08-02
210

311
### Fix
412

513
- Improved CSS architecture for easier child theme development.
6-
- Ensure shop category list uses arounded corners.
7-
- Fix syntax erorrs in `apply_filters()` calls.
14+
- Ensure shop category list uses rounded corners.
15+
- Fix syntax errors in `apply_filters()` calls.
816

917
## [1.12.0] - 2018-07-30
1018

@@ -35,7 +43,7 @@
3543
### Fix
3644

3745
- Don't output shipping calculator toggle when calculator is not output.
38-
- Don't layload the custom logo.
46+
- Don't lazyload the custom logo.
3947
- Properly add available stock to dropdown quantity.
4048
- Spacing above checkout completion button.
4149
- Ensure dynamic "Information" color is used for `.button--color-information` class.

app/customize/output/gray-300.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,7 @@
120120

121121
// @mixin form--input
122122
[
123-
'selectors' => [
124-
'textarea',
125-
'[type="email"]',
126-
'[type="search"]',
127-
'[type="tel"]',
128-
'[type="url"]',
129-
'[type="password"]',
130-
'[type="text"]',
131-
'.navbar-search__submit [type="submit"]',
132-
'.woocommerce .input-text',
133-
'.select2-container--default .select2-selection--single',
134-
'.select2-container--default:focus .select2-selection--single',
135-
],
123+
'selectors' => bigbox_customize_get_form_input_selectors(),
136124
'declarations' => [
137125
'border-color' => esc_attr( $gray300 ),
138126
],

app/customize/output/gray-400.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
'border-color' => esc_attr( $gray400 ),
2626
],
2727
],
28+
2829
// Solid border-color.
2930
[
3031
'selectors' => [
@@ -49,4 +50,12 @@
4950
'border-left-color' => 'transparent',
5051
],
5152
],
53+
54+
// @mixin form--input
55+
[
56+
'selectors' => bigbox_customize_add_state_to_selectors( bigbox_customize_get_form_input_selectors(), 'focus' ),
57+
'declarations' => [
58+
'border-color' => esc_attr( $gray400 ),
59+
],
60+
],
5261
];

app/customize/output/gutenberg.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
$output[] = [
1717
'selectors' => [
1818
".has-{$color}-background-color",
19-
".wp-block-button .wp-block-button__link.has-{$color}-background-color",
19+
".wp-block-button__link:not(.has-background).has-{$color}-background-color",
20+
".wp-block-button__link:not(.has-background).has-{$color}-background-color:active",
21+
".wp-block-button__link:not(.has-background).has-{$color}-background-color:focus",
22+
".wp-block-button__link:not(.has-background).has-{$color}-background-color:hover",
2023
],
2124
'declarations' => [
2225
'background-color' => esc_attr( bigbox_get_theme_color( $color ) ),
@@ -27,7 +30,7 @@
2730
'selectors' => [
2831
".has-{$color}-color",
2932
".has-{$color}-color a",
30-
".wp-block-button .wp-block-button__link.has-{$color}-color",
33+
".wp-block-button .wp-block-button__link:not(.has-background).has-{$color}-color",
3134
],
3235
'declarations' => [
3336
'color' => esc_attr( bigbox_get_theme_color( $color ) ),

app/customize/output/primary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
// Solid outline-color.
102102
'outline-color' => [
103103
'selectors' => [
104-
':focus',
104+
'.is-tabbing *:focus',
105105
],
106106
'declarations' => [
107107
'outline-color' => esc_attr( $primary ),

app/customize/selector-functions.php

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,28 @@
1313
exit; // Exit if accessed directly.
1414
}
1515

16+
/**
17+
* Add an element state to a list of selectors.
18+
*
19+
* @since 1.13.0
20+
*
21+
* @param array $selectors List of selectors.
22+
* @param string $state State to append.
23+
* @return array
24+
*/
25+
function bigbox_customize_add_state_to_selectors( $selectors, $state ) {
26+
return array_map(
27+
function( $selector ) use ( $state ) {
28+
return sprintf( '%1$s:%2$s', $selector, $state );
29+
},
30+
$selectors
31+
);
32+
}
33+
1634
/**
1735
* List of base button selectors.
1836
*
19-
* @since 1.0.0
37+
* @since 1.13.0
2038
*
2139
* @return array
2240
*/
@@ -35,14 +53,13 @@ function bigbox_customize_get_button_selectors() {
3553
'.facetwp-facet .facetwp-autocomplete-update',
3654
'.facetwp-facet .facetwp-slider-reset',
3755
'.comment-form [type="submit"]',
38-
'.wp-block-button .wp-block-button__link',
3956
];
4057
}
4158

4259
/**
4360
* List of base success button selectors.
4461
*
45-
* @since 1.0.0
62+
* @since 1.13.0
4663
*
4764
* @return array
4865
*/
@@ -57,3 +74,29 @@ function bigbox_customize_get_button_success_selectors() {
5774
'.woocommerce-notice-list__item .wc-forward',
5875
];
5976
}
77+
78+
/**
79+
* List of base form input selectors.
80+
*
81+
* @since 1.13.0
82+
*
83+
* @return array
84+
*/
85+
function bigbox_customize_get_form_input_selectors() {
86+
return [
87+
'textarea',
88+
'[type="email"]',
89+
'[type="search"]',
90+
'[type="tel"]',
91+
'[type="url"]',
92+
'[type="password"]',
93+
'[type="text"]',
94+
95+
'.navbar-search__submit [type="submit"]',
96+
97+
'.woocommerce .input-text',
98+
99+
'.select2-container--default .select2-selection--single',
100+
'.select2-container--default:focus .select2-selection--single',
101+
];
102+
}

app/integrations/gutenberg/class-gutenberg.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,41 @@ public function add_theme_support() {
5757
}
5858

5959
add_theme_support( 'editor-color-palette', $palette );
60+
61+
$sizes = [
62+
[
63+
'name' => __( 'Extra Small', 'bigbox' ),
64+
'shortName' => __( 'XS', 'bigbox' ),
65+
'size' => 12,
66+
'slug' => 'xs',
67+
],
68+
[
69+
'name' => __( 'Small', 'bigbox' ),
70+
'shortName' => __( 'S', 'bigbox' ),
71+
'size' => 14,
72+
'slug' => 'sm',
73+
],
74+
[
75+
'name' => __( 'Medium', 'bigbox' ),
76+
'shortName' => __( 'M', 'bigbox' ),
77+
'size' => 16,
78+
'slug' => 'base',
79+
],
80+
[
81+
'name' => __( 'Large', 'bigbox' ),
82+
'shortName' => __( 'L', 'bigbox' ),
83+
'size' => 20,
84+
'slug' => 'lg',
85+
],
86+
[
87+
'name' => __( 'Extra Large', 'bigbox' ),
88+
'shortName' => __( 'XL', 'bigbox' ),
89+
'size' => 26,
90+
'slug' => 'xl',
91+
],
92+
];
93+
94+
add_theme_support( 'editor-font-sizes', $sizes );
6095
}
6196

6297
/**

app/integrations/woocommerce/templates/checkout/payment-method.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,18 @@
2020
exit;
2121
}
2222
?>
23-
<li class="wc_payment_method payment_method_<?php echo $gateway->id; ?>">
24-
<input id="payment_method_<?php echo $gateway->id; ?>" type="radio" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>" />
23+
<li class="wc_payment_method payment_method_<?php echo esc_attr( $gateway->id ); ?>">
24+
<input id="payment_method_<?php echo esc_attr( $gateway->id ); ?>" type="radio" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>" />
2525

26-
<label for="payment_method_<?php echo $gateway->id; ?>" class="card">
27-
<?php echo $gateway->get_title(); ?> <?php echo $gateway->get_icon(); ?>
26+
<label for="payment_method_<?php echo esc_attr( $gateway->id ); ?>" class="card">
27+
<?php
28+
echo $gateway->get_title(); // WPCS: XSS okay.
29+
echo $gateway->get_icon(); // WPCS: XSS okay.
30+
?>
2831
</label>
32+
2933
<?php if ( $gateway->has_fields() || $gateway->get_description() ) : ?>
30-
<div class="payment_box payment_method_<?php echo $gateway->id; ?>" <?php echo esc_attr( ! $gateway->chosen ? 'style="display: none;"' : null ); ?>>
34+
<div class="payment_box payment_method_<?php echo esc_attr( $gateway->id ); ?>" <?php echo esc_attr( ! $gateway->chosen ? 'style="display: none;"' : null ); ?>>
3135
<?php $gateway->payment_fields(); ?>
3236
</div>
3337
<?php endif; ?>

app/integrations/woocommerce/templates/content-product.php

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

4040
<?php if ( bigbox_woocommerce_has_product_image( $product ) ) : ?>
4141
<div class="product__preview">
42-
<a href="<?php echo esc_url( apply_filters( 'woocommerce_loop_product_link', $product->get_permalink(), $product ) ); ?>" aria-label="<?php echo esc_attr( $product->get_title() ); ?>">
42+
<a href="<?php echo esc_url( apply_filters( 'woocommerce_loop_product_link', $product->get_permalink(), $product ) ); ?>" aria-label="<?php echo esc_attr( $product->get_title() ); ?>" tabindex="-1">
4343
<?php
4444
/**
4545
* Before shop loop item title.

app/integrations/woocommerce/templates/loop/price.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
?>
3939

4040
<span class="price">
41-
<a href="<?php echo esc_url( apply_filters( 'woocommerce_loop_product_link', $product->get_permalink(), $product ) ); ?>">
41+
<a href="<?php echo esc_url( apply_filters( 'woocommerce_loop_product_link', $product->get_permalink(), $product ) ); ?>" tabindex="-1">
4242
<?php echo $price_html; // WPCS: XSS okay. ?>
4343
</a>
4444
</span>

0 commit comments

Comments
 (0)