Simple CSS - Version 0.4

Version Description

  • Use browser search instead of CodeMirror dialog search
  • Don't show GeneratePress metabox if it's already activated
  • Make CSS box full height
Download this release

Release Info

Developer edge22
Plugin Icon 128x128 Simple CSS
Version 0.4
Comparing to
See all releases

Code changes from version 0.3 to 0.4

Files changed (4) hide show
  1. css/style.css +1 -34
  2. js/codemirror.js +2 -1
  3. readme.txt +12 -18
  4. simple-css.php +13 -39
css/style.css CHANGED
@@ -1,5 +1,5 @@
1
  .CodeMirror {
2
- height: 700px
3
  }
4
 
5
  .simple-css-save {
@@ -33,37 +33,4 @@
33
 
34
  .simple-css-sidebar .hndle {
35
  cursor: auto !important;
36
- }
37
-
38
- .CodeMirror-dialog {
39
- position: absolute;
40
- left: 0; right: 0;
41
- background: inherit;
42
- z-index: 15;
43
- padding: .1em .8em;
44
- overflow: hidden;
45
- color: inherit;
46
- }
47
-
48
- .CodeMirror-dialog-top {
49
- border-bottom: 1px solid #eee;
50
- top: 0;
51
- }
52
-
53
- .CodeMirror-dialog-bottom {
54
- border-top: 1px solid #eee;
55
- bottom: 0;
56
- }
57
-
58
- .CodeMirror-dialog input {
59
- border: none;
60
- outline: none;
61
- background: transparent;
62
- width: 20em;
63
- color: inherit;
64
- font-family: monospace;
65
- }
66
-
67
- .CodeMirror-dialog button {
68
- font-size: 70%;
69
  }
1
  .CodeMirror {
2
+ height: 80vh;
3
  }
4
 
5
  .simple-css-save {
33
 
34
  .simple-css-sidebar .hndle {
35
  cursor: auto !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
js/codemirror.js CHANGED
@@ -8878,7 +8878,8 @@ jQuery(function($){
8878
  styleActiveLine: true,
8879
  matchBrackets: true,
8880
  lineNumbers: true,
8881
- indentUnit: 4
 
8882
  });
8883
 
8884
  jQuery( '.change-theme').on('change', function() {
8878
  styleActiveLine: true,
8879
  matchBrackets: true,
8880
  lineNumbers: true,
8881
+ indentUnit: 4,
8882
+ viewportMargin: Infinity
8883
  });
8884
 
8885
  jQuery( '.change-theme').on('change', function() {
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: edge22
3
  Donate link: https://generatepress.com/ongoing-development
4
  Tags: CSS, custom CSS, Simple CSS, Simple Custom CSS, CSS Customizer, CSS metabox, CSS specific page
5
  Requires at least: 4.0
6
- Tested up to: 4.5
7
- Stable tag: 0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -54,22 +54,6 @@ In most cases, #1 will work fine and is way easier.
54
 
55
  * Navigate to your page or post in the Dashboard and look for the "Simple CSS" metabox.
56
 
57
- = CSS editor tips =
58
-
59
- * Ctrl-F / Cmd-F - Start searching
60
-
61
- * Ctrl-G / Cmd-G - Find next
62
-
63
- * Shift-Ctrl-G / Shift-Cmd-G - Find previous
64
-
65
- * Shift-Ctrl-F / Cmd-Option-F - Replace
66
-
67
- * Shift-Ctrl-R / Shift-Cmd-Option-F - Replace all
68
-
69
- * Alt-F - Persistent search (dialog doesn't autoclose, enter to find next, Shift-Enter to find previous)
70
-
71
- * Alt-G - Jump to line
72
-
73
  == Screenshots ==
74
 
75
  1. The dark theme of the CSS editor.
@@ -79,6 +63,11 @@ In most cases, #1 will work fine and is way easier.
79
 
80
  == Changelog ==
81
 
 
 
 
 
 
82
  = 0.3 =
83
  * Add CSS metabox to add CSS on specific pages and posts
84
  * Adjust styling of dark theme
@@ -95,6 +84,11 @@ In most cases, #1 will work fine and is way easier.
95
 
96
  == Upgrade Notice ==
97
 
 
 
 
 
 
98
  = 0.3 =
99
  * Add CSS metabox to add CSS on specific pages and posts
100
  * Adjust styling of dark theme
3
  Donate link: https://generatepress.com/ongoing-development
4
  Tags: CSS, custom CSS, Simple CSS, Simple Custom CSS, CSS Customizer, CSS metabox, CSS specific page
5
  Requires at least: 4.0
6
+ Tested up to: 4.6.1
7
+ Stable tag: 0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
54
 
55
  * Navigate to your page or post in the Dashboard and look for the "Simple CSS" metabox.
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  == Screenshots ==
58
 
59
  1. The dark theme of the CSS editor.
63
 
64
  == Changelog ==
65
 
66
+ = 0.4 =
67
+ * Use browser search instead of CodeMirror dialog search
68
+ * Don't show GeneratePress metabox if it's already activated
69
+ * Make CSS box full height
70
+
71
  = 0.3 =
72
  * Add CSS metabox to add CSS on specific pages and posts
73
  * Adjust styling of dark theme
84
 
85
  == Upgrade Notice ==
86
 
87
+ = 0.4 =
88
+ * Use browser search instead of CodeMirror dialog search
89
+ * Don't show GeneratePress metabox if it's already activated
90
+ * Make CSS box full height
91
+
92
  = 0.3 =
93
  * Add CSS metabox to add CSS on specific pages and posts
94
  * Adjust styling of dark theme
simple-css.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple CSS
4
  Plugin URI: https://generatepress.com
5
  Description: Simply add CSS to your WordPress site using an awesome CSS editor or the live Customizer.
6
- Version: 0.3
7
  Author: Tom Usborne
8
  Author URI: http://edge22.com
9
  License: GNU General Public License v2 or later
@@ -46,9 +46,9 @@ function simple_css_scripts()
46
  // Load codemirror javascript
47
  wp_enqueue_script( 'simple-css-codemirror-js', plugin_dir_url( __FILE__ ) . 'js/codemirror.js', array( 'jquery' ), null );
48
  wp_enqueue_script( 'simple-css-js', plugin_dir_url( __FILE__ ) . 'js/css.js', array( 'jquery' ), null );
49
- wp_enqueue_script( 'simple-css-search', plugin_dir_url( __FILE__ ) . 'js/search.js', array( 'jquery' ), null );
50
- wp_enqueue_script( 'simple-css-search-cursor', plugin_dir_url( __FILE__ ) . 'js/searchcursor.js', array( 'jquery' ), null );
51
- wp_enqueue_script( 'simple-css-dialog', plugin_dir_url( __FILE__ ) . 'js/dialog.js', array( 'jquery' ), null );
52
 
53
  // Load codemirror CSS
54
  wp_enqueue_style( 'simple-css-codemirror-css', plugin_dir_url( __FILE__ ) . 'css/codemirror.css', null, null );
@@ -111,14 +111,15 @@ function simple_css_editor()
111
  <option value="2" <?php selected( $theme, 2 ); ?>><?php _e( 'Light','simple-css' );?></option>
112
  </select>
113
  </div>
114
-
115
- <div class="postbox">
116
- <h3 class="hndle"><span><?php _e( 'GeneratePress', 'simple-css' ); ?></span></h3>
117
- <div class="inside">
118
- <p><?php printf( __( 'Check out our free WordPress theme, %s.', 'simple-css' ), '<a href="https://generatepress.com/?utm_source=simplecss&utm_medium=plugin&utm_campaign=Simple%20CSS
119
- " target="_blank">GeneratePress</a>' ); ?></p>
 
120
  </div>
121
- </div>
122
 
123
  <div class="postbox">
124
  <h3 class="hndle"><span><?php _e( 'Customizer', 'simple-css' ); ?></span></h3>
@@ -130,34 +131,7 @@ function simple_css_editor()
130
  <div class="postbox">
131
  <h3 class="hndle"><span><?php _e( 'Tips', 'simple-css' ); ?></span></h3>
132
  <div class="inside">
133
- <p>
134
- <strong>Ctrl-F / Cmd-F</strong><br />
135
- <?php _e( 'Start searching', 'simple-css' ); ?>
136
- <p>
137
- <p>
138
- <strong>Ctrl-G / Cmd-G</strong><br />
139
- <?php _e( 'Find next', 'simple-css' ); ?>
140
- <p>
141
- <p>
142
- <strong>Shift-Ctrl-G / Shift-Cmd-G</strong><br />
143
- <?php _e( 'Find previous', 'simple-css' ); ?>
144
- <p>
145
- <p>
146
- <strong>Shift-Ctrl-F / Cmd-Option-F</strong><br />
147
- <?php _e( 'Replace', 'simple-css' ); ?>
148
- <p>
149
- <p>
150
- <strong>Shift-Ctrl-R / Shift-Cmd-Option-F</strong><br />
151
- <?php _e( 'Replace all', 'simple-css' ); ?>
152
- <p>
153
- <p>
154
- <strong>Alt-F</strong><br />
155
- <?php _e( 'Persistent search (dialog does not autoclose, enter to find next, Shift-Enter to find previous)', 'simple-css' ); ?>
156
- <p>
157
- <p>
158
- <strong>Alt-G</strong><br />
159
- <?php _e( 'Jump to line', 'simple-css' ); ?>
160
- <p>
161
  </div>
162
  </div>
163
  </div>
3
  Plugin Name: Simple CSS
4
  Plugin URI: https://generatepress.com
5
  Description: Simply add CSS to your WordPress site using an awesome CSS editor or the live Customizer.
6
+ Version: 0.4
7
  Author: Tom Usborne
8
  Author URI: http://edge22.com
9
  License: GNU General Public License v2 or later
46
  // Load codemirror javascript
47
  wp_enqueue_script( 'simple-css-codemirror-js', plugin_dir_url( __FILE__ ) . 'js/codemirror.js', array( 'jquery' ), null );
48
  wp_enqueue_script( 'simple-css-js', plugin_dir_url( __FILE__ ) . 'js/css.js', array( 'jquery' ), null );
49
+ //wp_enqueue_script( 'simple-css-search', plugin_dir_url( __FILE__ ) . 'js/search.js', array( 'jquery' ), null );
50
+ //wp_enqueue_script( 'simple-css-search-cursor', plugin_dir_url( __FILE__ ) . 'js/searchcursor.js', array( 'jquery' ), null );
51
+ //wp_enqueue_script( 'simple-css-dialog', plugin_dir_url( __FILE__ ) . 'js/dialog.js', array( 'jquery' ), null );
52
 
53
  // Load codemirror CSS
54
  wp_enqueue_style( 'simple-css-codemirror-css', plugin_dir_url( __FILE__ ) . 'css/codemirror.css', null, null );
111
  <option value="2" <?php selected( $theme, 2 ); ?>><?php _e( 'Light','simple-css' );?></option>
112
  </select>
113
  </div>
114
+
115
+ <?php if ( ! defined( 'GENERATE_VERSION' ) ) : ?>
116
+ <div class="postbox">
117
+ <h3 class="hndle"><span><?php _e( 'GeneratePress', 'simple-css' ); ?></span></h3>
118
+ <div class="inside">
119
+ <p><?php printf( __( 'Check out our free WordPress theme, %s.', 'simple-css' ), '<a href="https://generatepress.com" target="_blank">GeneratePress</a>' ); ?></p>
120
+ </div>
121
  </div>
122
+ <?php endif; ?>
123
 
124
  <div class="postbox">
125
  <h3 class="hndle"><span><?php _e( 'Customizer', 'simple-css' ); ?></span></h3>
131
  <div class="postbox">
132
  <h3 class="hndle"><span><?php _e( 'Tips', 'simple-css' ); ?></span></h3>
133
  <div class="inside">
134
+ <p><?php _e( 'Simple CSS should not be used for huge documents. If your CSS is larger than 1000 lines, you should consider using a child theme.', 'simple-css' ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  </div>
136
  </div>
137
  </div>