summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/site-logo')
-rw-r--r--plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css39
-rw-r--r--plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css3
-rw-r--r--plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php23
4 files changed, 62 insertions, 5 deletions
diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css
index d5441db1..e0d9a2c4 100644
--- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css
+++ b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css
@@ -1,6 +1,37 @@
+/* Do not modify this file directly. It is concatenated from individual module CSS files. */
/**
- * RTL styles for the Site Logo control. Just swaps the button sides.
+ * Styles for the Site Logo control.
*/
+#customize-control-site_logo .current {
+ margin-bottom: 6px;
+}
+
+#customize-control-site_logo .current span {
+ border: 1px solid #eee;
+ border-radius: 2px;
+ color: #555;
+ display: block;
+ overflow: hidden;
+ line-height: 40px;
+ min-height: 40px;
+ padding: 0 6px;
+ text-align: center;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+#customize-control-site_logo .current img {
+ max-width: 100%;
+}
+
+#customize-control-site_logo button.new,
+#customize-control-site_logo button.change,
+#customize-control-site_logo button.remove {
+ height: auto;
+ width: 48%;
+ white-space: normal;
+}
+
#customize-control-site_logo .remove {
float: right;
margin-left: 3px;
@@ -10,3 +41,9 @@
#customize-control-site_logo .change {
float: left;
}
+
+#customize-control-site_logo .customize-control-description {
+ display: block;
+ clear: both;
+ margin-bottom: 10px;
+} \ No newline at end of file
diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css
index 1893fe9c..f07c2f74 100644
--- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css
+++ b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css
@@ -1 +1 @@
-#customize-control-site_logo .remove{float:right;margin-left:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:left} \ No newline at end of file
+#customize-control-site_logo .current{margin-bottom:6px}#customize-control-site_logo .current span{border:1px solid #eee;border-radius:2px;color:#555;display:block;overflow:hidden;line-height:40px;min-height:40px;padding:0 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap}#customize-control-site_logo .current img{max-width:100%}#customize-control-site_logo button.change,#customize-control-site_logo button.new,#customize-control-site_logo button.remove{height:auto;width:48%;white-space:normal}#customize-control-site_logo .remove{float:right;margin-left:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:left}#customize-control-site_logo .customize-control-description{display:block;clear:both;margin-bottom:10px} \ No newline at end of file
diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css
index 7fcee5ae..0c1eede3 100644
--- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css
+++ b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css
@@ -1 +1,2 @@
-#customize-control-site_logo .current{margin-bottom:6px}#customize-control-site_logo .current span{border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px;color:#555;display:block;overflow:hidden;line-height:40px;min-height:40px;padding:0 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap}#customize-control-site_logo .current img{max-width:100%}#customize-control-site_logo button.change,#customize-control-site_logo button.new,#customize-control-site_logo button.remove{height:auto;width:48%;white-space:normal}#customize-control-site_logo .remove{float:left;margin-right:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:right}#customize-control-site_logo .customize-control-description{display:block;clear:both;margin-bottom:10px} \ No newline at end of file
+/* Do not modify this file directly. It is concatenated from individual module CSS files. */
+#customize-control-site_logo .current{margin-bottom:6px}#customize-control-site_logo .current span{border:1px solid #eee;border-radius:2px;color:#555;display:block;overflow:hidden;line-height:40px;min-height:40px;padding:0 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap}#customize-control-site_logo .current img{max-width:100%}#customize-control-site_logo button.change,#customize-control-site_logo button.new,#customize-control-site_logo button.remove{height:auto;width:48%;white-space:normal}#customize-control-site_logo .remove{float:left;margin-right:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:right}#customize-control-site_logo .customize-control-description{display:block;clear:both;margin-bottom:10px} \ No newline at end of file
diff --git a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php b/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php
index 5e23507d..209cc000 100644
--- a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php
+++ b/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php
@@ -54,8 +54,27 @@ class Site_Logo_Image_Control extends WP_Customize_Control {
// Enqueues all needed media resources.
wp_enqueue_media();
- // Enqueue our control script and styles.
- wp_enqueue_style( 'site-logo-control', plugins_url( '../css/site-logo-control.css', __FILE__ ) );
+ /*
+ * Enqueue our control script and styles.
+ */
+
+ // We only enqueue a minified version of the file on prod. Jetpack.
+ $min = (
+ ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
+ || ( defined( 'IS_WPCOM' ) && IS_WPCOM )
+ )
+ ? ''
+ : '.min';
+
+ wp_enqueue_style(
+ 'site-logo-control',
+ plugins_url( '../css/site-logo-control.css', __FILE__ ),
+ array(),
+ JETPACK__VERSION
+ );
+ wp_style_add_data( 'site-logo-control', 'rtl', 'replace' );
+ wp_style_add_data( 'site-logo-control', 'suffix', $min );
+
wp_enqueue_script( 'site-logo-control', plugins_url( '../js/site-logo-control.js', __FILE__ ), array( 'media-views', 'customize-controls', 'underscore' ), '', true );
}