Browse Source

Varia: Add support for Jetpack editor styles.

Allan Cole 5 years ago
parent
commit
3258b530d6

+ 8 - 0
varia/sass/vendors/_editor.scss

@@ -0,0 +1,8 @@
+/**
+ * Vendors
+ * - 3rd-party compatibility styles
+ */
+
+@import "jetpack/editor";
+
+// @import "wpcom";

+ 2 - 1
varia/sass/vendors/_imports.scss

@@ -3,5 +3,6 @@
  * - 3rd-party compatibility styles
  */
 
-@import "jetpack";
+@import "jetpack/style";
+
 // @import "wpcom";

+ 23 - 0
varia/sass/vendors/jetpack/_editor.scss

@@ -0,0 +1,23 @@
+/**
+ * Set Jetpack form text color
+ */
+.jetpack-contact-info-block .jetpack-address-block {
+	input[type=color], 
+	input[type=date], 
+	input[type=datetime-local], 
+	input[type=datetime], 
+	input[type=email], 
+	input[type=month], 
+	input[type=number], 
+	input[type=password], 
+	input[type=search], 
+	input[type=tel], 
+	input[type=text], 
+	input[type=time], 
+	input[type=url], 
+	input[type=week], 
+	select, 
+	textarea {
+		color: map-deep-get($config-elements, "form", "color", "text");
+	}
+}

+ 24 - 0
varia/sass/vendors/_jetpack.scss → varia/sass/vendors/jetpack/_style.scss

@@ -173,3 +173,27 @@ body {
 		}
 	}
 }
+
+/**
+ * Set Jetpack form text color
+ */
+.jetpack-address-block is-selected {
+	input[type=color], 
+	input[type=date], 
+	input[type=datetime-local], 
+	input[type=datetime], 
+	input[type=email], 
+	input[type=month], 
+	input[type=number], 
+	input[type=password], 
+	input[type=search], 
+	input[type=tel], 
+	input[type=text], 
+	input[type=time], 
+	input[type=url], 
+	input[type=week], 
+	select, 
+	textarea {
+		color: map-deep-get($config-elements, "form", "color", "text");
+	}
+}

+ 30 - 0
varia/style-editor.css

@@ -1688,3 +1688,33 @@ table.is-style-stripes tbody tr:nth-child(odd),
 	margin-top: 36px;
 	z-index: 20;
 }
+
+/**
+ * Vendors
+ * - Styles for 3rd party plugins and WP extensions
+ */
+/**
+ * Vendors
+ * - 3rd-party compatibility styles
+ */
+/**
+ * Set Jetpack form text color
+ */
+.jetpack-contact-info-block .jetpack-address-block input[type=color],
+.jetpack-contact-info-block .jetpack-address-block input[type=date],
+.jetpack-contact-info-block .jetpack-address-block input[type=datetime-local],
+.jetpack-contact-info-block .jetpack-address-block input[type=datetime],
+.jetpack-contact-info-block .jetpack-address-block input[type=email],
+.jetpack-contact-info-block .jetpack-address-block input[type=month],
+.jetpack-contact-info-block .jetpack-address-block input[type=number],
+.jetpack-contact-info-block .jetpack-address-block input[type=password],
+.jetpack-contact-info-block .jetpack-address-block input[type=search],
+.jetpack-contact-info-block .jetpack-address-block input[type=tel],
+.jetpack-contact-info-block .jetpack-address-block input[type=text],
+.jetpack-contact-info-block .jetpack-address-block input[type=time],
+.jetpack-contact-info-block .jetpack-address-block input[type=url],
+.jetpack-contact-info-block .jetpack-address-block input[type=week],
+.jetpack-contact-info-block .jetpack-address-block select,
+.jetpack-contact-info-block .jetpack-address-block textarea {
+	color: black;
+}

+ 6 - 0
varia/style-editor.scss

@@ -39,3 +39,9 @@
  * - Full Site Editing overrides
  */
  @import "sass/full-site-editing/editor";
+
+/**
+ * Vendors
+ * - Styles for 3rd party plugins and WP extensions
+ */
+@import "sass/vendors/editor";

+ 22 - 0
varia/style-rtl.css

@@ -4052,6 +4052,28 @@ body.admin-bar .widget_eu_cookie_law_widget.widget.top {
 	margin-bottom: 0;
 }
 
+/**
+ * Set Jetpack form text color
+ */
+.jetpack-address-block is-selected input[type=color],
+.jetpack-address-block is-selected input[type=date],
+.jetpack-address-block is-selected input[type=datetime-local],
+.jetpack-address-block is-selected input[type=datetime],
+.jetpack-address-block is-selected input[type=email],
+.jetpack-address-block is-selected input[type=month],
+.jetpack-address-block is-selected input[type=number],
+.jetpack-address-block is-selected input[type=password],
+.jetpack-address-block is-selected input[type=search],
+.jetpack-address-block is-selected input[type=tel],
+.jetpack-address-block is-selected input[type=text],
+.jetpack-address-block is-selected input[type=time],
+.jetpack-address-block is-selected input[type=url],
+.jetpack-address-block is-selected input[type=week],
+.jetpack-address-block is-selected select,
+.jetpack-address-block is-selected textarea {
+	color: black;
+}
+
 /**
  * Full Site Editing
  * - Full Site Editing overrides

+ 22 - 0
varia/style.css

@@ -4081,6 +4081,28 @@ body.admin-bar .widget_eu_cookie_law_widget.widget.top {
 	margin-bottom: 0;
 }
 
+/**
+ * Set Jetpack form text color
+ */
+.jetpack-address-block is-selected input[type=color],
+.jetpack-address-block is-selected input[type=date],
+.jetpack-address-block is-selected input[type=datetime-local],
+.jetpack-address-block is-selected input[type=datetime],
+.jetpack-address-block is-selected input[type=email],
+.jetpack-address-block is-selected input[type=month],
+.jetpack-address-block is-selected input[type=number],
+.jetpack-address-block is-selected input[type=password],
+.jetpack-address-block is-selected input[type=search],
+.jetpack-address-block is-selected input[type=tel],
+.jetpack-address-block is-selected input[type=text],
+.jetpack-address-block is-selected input[type=time],
+.jetpack-address-block is-selected input[type=url],
+.jetpack-address-block is-selected input[type=week],
+.jetpack-address-block is-selected select,
+.jetpack-address-block is-selected textarea {
+	color: black;
+}
+
 /**
  * Full Site Editing
  * - Full Site Editing overrides