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

re-add letter-spacing #19

Merged
merged 1 commit into from
Mar 21, 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
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 @@ -482,7 +482,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