浏览代码

Varya: Add testing styles for testing and improving the `colors.php` plugin.

Allan Cole 5 年之前
父节点
当前提交
1abb682e4e
共有 2 个文件被更改,包括 42 次插入0 次删除
  1. 21 0
      varia/inc/wpcom-colors.php
  2. 21 0
      varia/inc/wpcom-editor-colors.php

+ 21 - 0
varia/inc/wpcom-colors.php

@@ -0,0 +1,21 @@
+<?php
+/* Custom Colors: Varia */
+
+// Background Color (White)
+// $config-global--color-background-default
+add_color_rule( 'bg', '#ffffff', array(
+
+	// Background-color
+	array( 'body', 'background-color' ),
+
+), __( 'Background Color' ) );
+
+// Text Color (Gray)
+// $config-global--color-foreground-default
+add_color_rule( 'txt', '#444444', array(
+
+	// Text-color
+	// Needs contrast against `bg` with more contrast
+	array( 'body', 'color', 'bg', 7 ),
+
+), __( 'Forground Color' ) );

+ 21 - 0
varia/inc/wpcom-editor-colors.php

@@ -0,0 +1,21 @@
+<?php
+/* Custom Editor Colors: Varia */
+
+// Background Color (White)
+// $config-global--color-background-default
+add_color_rule( 'bg', '#ffffff', array(
+
+	// Background-color
+	array( '.editor-styles-wrapper', 'background-color' ),
+
+), __( 'Background Color' ) );
+
+// Text Color (Gray)
+// $config-global--color-foreground-default
+add_color_rule( 'txt', '#444444', array(
+
+	// Text-color
+	// Needs contrast against `bg` with more contrast
+	array( '.editor-styles-wrapper', 'color', 'bg', 7 ),
+
+), __( 'Forground Color' ) );