Skip to content

Commit

Permalink
re-add letter-spacing (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesros161 authored Mar 21, 2023
1 parent 5e9acec commit 2086a8a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions prime/inc/boldgrid-theme-framework-config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function boldgrid_prime_framework_config( $config ) {
$config['customizer']['controls']['bgtfw_site_title_typography']['default'] = array(
'font-family' => 'Source Sans Pro',
'font-size' => '42px',
'letter-spacing' => '0',
'text-transform' => 'none',
'line-height' => '1.1',
'variant' => '600',
Expand All @@ -61,6 +62,7 @@ function boldgrid_prime_framework_config( $config ) {
'font-size' => '20px',
'text-transform' => 'lowercase',
'line-height' => '1.1',
'letter-spacing' => '0',
'variant' => 'regular',
);

Expand Down Expand Up @@ -386,6 +388,7 @@ function boldgrid_prime_framework_config( $config ) {
'font-family' => 'Roboto',
'font-size' => '16px',
'line-height' => '1.8',
'letter-spacing' => '0',
'text-transform' => 'none',
'variant' => 'regular',
);
Expand All @@ -395,6 +398,7 @@ function boldgrid_prime_framework_config( $config ) {
'font-family' => 'Roboto',
'font-size' => '16px',
'line-height' => '1.5',
'letter-spacing' => '0',
'text-transform' => 'none',
'variant' => 'regular',
);
Expand All @@ -403,6 +407,7 @@ function boldgrid_prime_framework_config( $config ) {
$config['customizer']['controls']['bgtfw_headings_typography']['default'] = array(
'font-family' => 'Source Sans Pro',
'line-height' => '1.1',
'letter-spacing' => '0',
'text-transform' => 'none',
'variant' => '600',
);
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/customizer/customizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ BOLDGRID.Customizer.Util.getInitialPalettes = function( option ) {
*/
api( 'bgtfw_site_title_typography', 'bgtfw_tagline_typography', ( ...args ) => {
args.map( ( control ) => {
let settings = [ 'font-size', 'line-height', 'font-family', 'font-weight' ];
let settings = [ 'font-size', 'line-height', 'letter-spacing', 'font-family', 'font-weight' ];
let update = ( to ) => {
_.each( settings, _.once( ( setting ) => control[ setting ] === to[ setting ] || calc() ) );
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ public function generate_headings_color_css( $theme_mod, $section, $selectors =
* @return array $values Formatted output values.
*/
public function get_typography_output( $configs, $elements ) {
$props = [ 'font-family', 'font-size', 'line-height', 'text-transform', 'variant', 'font-style' ];
$props = [ 'font-family', 'font-size', 'line-height', 'letter-spacing', 'text-transform', 'variant', 'font-style' ];
$values = [];
foreach ( $props as $prop ) {
$values[] = [
Expand Down Expand Up @@ -697,7 +697,7 @@ public function get_output_values( $configs ) {
}
}
$elements = implode( ', ', array_keys( $selectors ) );
$props = [ 'font-family', 'line-height', 'text-transform', 'variant', 'font-style' ];
$props = [ 'font-family', 'line-height', 'letter-spacing', 'text-transform', 'variant', 'font-style' ];
$values = [];

foreach ( $props as $prop ) {
Expand Down

0 comments on commit 2086a8a

Please sign in to comment.