From b9c47f29c6094b022b628786c4d2031da39c1203 Mon Sep 17 00:00:00 2001 From: imontalvomiguel Date: Sat, 1 Aug 2015 21:17:11 -0500 Subject: [PATCH 1/6] Using the settings.logo_max_width value in styles --- assets/timber.scss.liquid | 6 +++++- config/settings_schema.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/timber.scss.liquid b/assets/timber.scss.liquid index 845abc74b..12d7497b4 100755 --- a/assets/timber.scss.liquid +++ b/assets/timber.scss.liquid @@ -80,6 +80,10 @@ $breakpoint-has-pull: ('medium', 'medium-down', 'large'); // Timber Colors $colorPrimary: {{ settings.color_primary }}; $colorSecondary: {{ settings.color_secondary }}; +$logoMaxWidth: 450px; // Default value +{% unless settings.logo_max_width == blank %} + $logoMaxWidth: {{ settings.logo_max_width }}; +{% endunless %} // Button colors $colorBtnPrimary: $colorPrimary; @@ -1791,7 +1795,7 @@ label.error { } .site-header__logo-link { - max-width: 450px; // max upload size + max-width: $logoMaxWidth; margin: 0 auto; } diff --git a/config/settings_schema.json b/config/settings_schema.json index 2ca3b62a8..029890d4c 100644 --- a/config/settings_schema.json +++ b/config/settings_schema.json @@ -117,7 +117,7 @@ "id": "logo_max_width", "label": "Max Logo Width", "default": "450", - "info": "Defines the CSS max-width." + "info": "Defines the CSS max-width. Ex. 120px" }, { "type": "header", From 30676c24f362b883804c58886e26146a6a4117b2 Mon Sep 17 00:00:00 2001 From: imontalvomiguel Date: Sat, 1 Aug 2015 21:41:22 -0500 Subject: [PATCH 2/6] New variables section for the setting --- assets/timber.scss.liquid | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/timber.scss.liquid b/assets/timber.scss.liquid index 12d7497b4..71c6f9763 100755 --- a/assets/timber.scss.liquid +++ b/assets/timber.scss.liquid @@ -80,10 +80,6 @@ $breakpoint-has-pull: ('medium', 'medium-down', 'large'); // Timber Colors $colorPrimary: {{ settings.color_primary }}; $colorSecondary: {{ settings.color_secondary }}; -$logoMaxWidth: 450px; // Default value -{% unless settings.logo_max_width == blank %} - $logoMaxWidth: {{ settings.logo_max_width }}; -{% endunless %} // Button colors $colorBtnPrimary: $colorPrimary; @@ -117,6 +113,12 @@ $colorNavText: #333; $colorFooterBg: {{ settings.color_footer_bg }}; $colorFooterText: {{ settings.color_footer_text }}; +// Logo max width +$logoMaxWidth: 450px; // Default value +{% unless settings.logo_max_width == blank %} + $logoMaxWidth: {{ settings.logo_max_width }}; +{% endunless %} + // Helper colors $disabledGrey: #f6f6f6; $disabledBorder: darken($disabledGrey, 25%); From a532efbed16232099e3b318d065d2f4a2bf3b408 Mon Sep 17 00:00:00 2001 From: imontalvomiguel Date: Sun, 2 Aug 2015 01:13:38 -0500 Subject: [PATCH 3/6] Short way to asign the setting val or default val --- assets/timber.scss.liquid | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/assets/timber.scss.liquid b/assets/timber.scss.liquid index 71c6f9763..820d697c7 100755 --- a/assets/timber.scss.liquid +++ b/assets/timber.scss.liquid @@ -114,10 +114,7 @@ $colorFooterBg: {{ settings.color_footer_bg }}; $colorFooterText: {{ settings.color_footer_text }}; // Logo max width -$logoMaxWidth: 450px; // Default value -{% unless settings.logo_max_width == blank %} - $logoMaxWidth: {{ settings.logo_max_width }}; -{% endunless %} +$logoMaxWidth: {{ settings.logo_max_width | default: '450px' }}; // Helper colors $disabledGrey: #f6f6f6; From 038804c03b69ea6742dd6eafd6784129718ffd6c Mon Sep 17 00:00:00 2001 From: imontalvomiguel Date: Sun, 2 Aug 2015 13:11:50 -0500 Subject: [PATCH 4/6] px unit --- config/settings_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/settings_schema.json b/config/settings_schema.json index 029890d4c..cc17edf49 100644 --- a/config/settings_schema.json +++ b/config/settings_schema.json @@ -116,7 +116,7 @@ "type": "text", "id": "logo_max_width", "label": "Max Logo Width", - "default": "450", + "default": "450px", "info": "Defines the CSS max-width. Ex. 120px" }, { From 7b72ce1f8183ba7e28227df9dd36f81f0c2c34f5 Mon Sep 17 00:00:00 2001 From: imontalvomiguel Date: Tue, 4 Aug 2015 10:41:39 -0500 Subject: [PATCH 5/6] not require px val in text box --- assets/timber.scss.liquid | 2 +- config/settings_schema.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/timber.scss.liquid b/assets/timber.scss.liquid index 820d697c7..6f7df973a 100755 --- a/assets/timber.scss.liquid +++ b/assets/timber.scss.liquid @@ -114,7 +114,7 @@ $colorFooterBg: {{ settings.color_footer_bg }}; $colorFooterText: {{ settings.color_footer_text }}; // Logo max width -$logoMaxWidth: {{ settings.logo_max_width | default: '450px' }}; +$logoMaxWidth: {{ settings.logo_max_width | default: '450' }}px; // Helper colors $disabledGrey: #f6f6f6; diff --git a/config/settings_schema.json b/config/settings_schema.json index cc17edf49..bbbbcfda0 100644 --- a/config/settings_schema.json +++ b/config/settings_schema.json @@ -116,8 +116,8 @@ "type": "text", "id": "logo_max_width", "label": "Max Logo Width", - "default": "450px", - "info": "Defines the CSS max-width. Ex. 120px" + "default": "450", + "info": "Defined in pixels. Do not add the 'px' unit." }, { "type": "header", From 15dc4407e2b92145e996ff995269bb4723269304 Mon Sep 17 00:00:00 2001 From: Montalvo Miguelo Date: Wed, 16 Sep 2015 16:56:16 -0500 Subject: [PATCH 6/6] Even px unit does not break --- assets/timber.scss.liquid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/timber.scss.liquid b/assets/timber.scss.liquid index 6f7df973a..46b94dfd2 100755 --- a/assets/timber.scss.liquid +++ b/assets/timber.scss.liquid @@ -114,7 +114,7 @@ $colorFooterBg: {{ settings.color_footer_bg }}; $colorFooterText: {{ settings.color_footer_text }}; // Logo max width -$logoMaxWidth: {{ settings.logo_max_width | default: '450' }}px; +$logoMaxWidth: {{ settings.logo_max_width | default: '450' | remove: 'px' }}px; // Helper colors $disabledGrey: #f6f6f6;