Bläddra i källkod

Remove form styles from the editor

Ben Dwyer 4 år sedan
förälder
incheckning
7bdb06f900
4 ändrade filer med 208 tillägg och 210 borttagningar
  1. 0 6
      penscratch-2/css/blocks.css
  2. 203 0
      penscratch-2/css/forms.css
  3. 5 2
      penscratch-2/functions.php
  4. 0 202
      penscratch-2/style.css

+ 0 - 6
penscratch-2/css/blocks.css

@@ -42,12 +42,6 @@ p.has-drop-cap:not(:focus)::first-letter {
 	margin-top: 0.15em;
 }
 
-/* Gallery */
-
-.wp-block-gallery {
-	margin: 0 0 27px;
-}
-
 /* Quote */
 
 .wp-block-quote.is-large,

+ 203 - 0
penscratch-2/css/forms.css

@@ -0,0 +1,203 @@
+
+/* =Forms
+----------------------------------------------- */
+
+button,
+input[type='button'],
+input[type='reset'],
+input[type='submit'],
+.button,
+.button:visited {
+	font-family: "Roboto Slab", Georgia, Times, serif;
+	box-sizing: border-box;
+	padding: 10px 14px;
+	-webkit-transition: all .3s ease-in-out;
+			transition: all .3s ease-in-out;
+	letter-spacing: 1px;
+	text-transform: uppercase;
+	color: #999;
+	border: 3px solid #eee;
+	background: white;
+	box-shadow: none;
+	text-shadow: none;
+}
+button:hover,
+button:focus,
+button:active,
+input[type='button']:hover,
+input[type='button']:focus,
+input[type='button']:active,
+input[type='reset']:hover,
+input[type='reset']:focus,
+input[type='reset']:active,
+input[type='submit']:hover,
+input[type='submit']:focus,
+input[type='submit']:active,
+.button:hover,
+.button:focus,
+.button:active {
+	-webkit-transition: all .3s ease-in-out;
+			transition: all .3s ease-in-out;
+	color: #1c7c7c;
+	border-color: #1c7c7c;
+	box-shadow: none;
+}
+
+input[type='text'],
+input[type='email'],
+input[type='url'],
+input[type='password'],
+input[type='search'] {
+	-webkit-box-sizing: border-box;
+	   -moz-box-sizing: border-box;
+			box-sizing: border-box;
+	max-width: 100%;
+	padding: 12px;
+	border: 1px solid #eee;
+}
+input[type='text']:active,
+input[type='text']:focus,
+input[type='email']:active,
+input[type='email']:focus,
+input[type='url']:active,
+input[type='url']:focus,
+input[type='password']:active,
+input[type='password']:focus,
+input[type='search']:active,
+input[type='search']:focus {
+	border-color: #d4d4d4;
+	outline: none;
+	background: white;
+}
+
+textarea {
+	-webkit-box-sizing: border-box;
+	   -moz-box-sizing: border-box;
+			box-sizing: border-box;
+	max-width: 100%;
+	padding: 12px;
+	border: 1px solid #eee;
+}
+textarea:active,
+textarea:focus {
+	border-color: #d4d4d4;
+	outline: none;
+}
+
+button,
+input,
+select,
+textarea {
+	margin: 0;
+	/* Addresses margins set differently in IE6/7, F3, S5, Chrome */
+
+	vertical-align: baseline;
+	/* Improves appearance and consistency in all browsers */
+
+	*vertical-align: middle;
+	/* Improves appearance and consistency in all browsers */
+}
+
+button,
+input[type='button'],
+input[type='reset'],
+input[type='submit'] {
+	cursor: pointer;
+	color: rgba(0, 0, 0, .8);
+	border: 1px solid #ccc;
+	border-color: #ccc #ccc #bbb #ccc;
+	border-radius: 3px;
+	background: #e6e6e6;
+	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 15px 17px rgba(255, 255, 255, .5), inset 0 -5px 12px rgba(0, 0, 0, .05);
+	/* Corrects inability to style clickable 'input' types in iOS */
+	text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
+	/* Improves usability and consistency of cursor style between image-type 'input' and others */
+
+	-webkit-appearance: button;
+}
+
+button:hover,
+input[type='button']:hover,
+input[type='reset']:hover,
+input[type='submit']:hover {
+	border-color: #ccc #bbb #aaa #bbb;
+	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 15px 17px rgba(255, 255, 255, .8), inset 0 -5px 12px rgba(0, 0, 0, .02);
+}
+
+button:focus,
+input[type='button']:focus,
+input[type='reset']:focus,
+input[type='submit']:focus,
+button:active,
+input[type='button']:active,
+input[type='reset']:active,
+input[type='submit']:active {
+	border-color: #aaa #bbb #bbb #bbb;
+	box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .5), inset 0 2px 5px rgba(0, 0, 0, .15);
+}
+
+input[type='checkbox'],
+input[type='radio'] {
+	padding: 0;
+	/* Addresses excess padding in IE8/9 */
+}
+
+input[type='search'] {
+	/* Addresses appearance set to searchfield in S5, Chrome */
+	-webkit-box-sizing: content-box;
+	/* Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof) */
+	   -moz-box-sizing: content-box;
+			box-sizing: content-box;
+			-webkit-appearance: textfield;
+}
+
+input[type='search']::-webkit-search-decoration {
+	/* Corrects inner padding displayed oddly in S5, Chrome on OSX */
+	-webkit-appearance: none;
+}
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+	padding: 0;
+	/* Corrects inner padding and border displayed oddly in FF3 www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ */
+
+	border: 0;
+}
+
+input[type='text'],
+input[type='email'],
+input[type='url'],
+input[type='password'],
+input[type='search'],
+textarea {
+	color: #666;
+	border: 1px solid #ccc;
+	border-radius: 3px;
+}
+
+input[type='text']:focus,
+input[type='email']:focus,
+input[type='url']:focus,
+input[type='password']:focus,
+input[type='search']:focus,
+textarea:focus {
+	color: #111;
+}
+
+input[type='text'],
+input[type='email'],
+input[type='url'],
+input[type='password'],
+input[type='search'] {
+	padding: 3px;
+}
+
+textarea {
+	overflow: auto;
+	/* Improves readability and alignment in all browsers */
+
+	width: 98%;
+	/* Removes default vertical scrollbar in IE6/7/8/9 */
+	padding-left: 3px;
+	vertical-align: top;
+}

+ 5 - 2
penscratch-2/functions.php

@@ -213,11 +213,14 @@ add_action( 'widgets_init', 'penscratch_2_widgets_init' );
  * Enqueue scripts and styles.
  */
 function penscratch_2_scripts() {
-	wp_enqueue_style( 'penscratch-2-style', get_stylesheet_uri() );
+	wp_enqueue_style( 'penscratch-2-style', get_stylesheet_uri(), array( 'penscratch-2-reset' ) );
 	wp_enqueue_style( 'penscratch-2-fonts', penscratch_2_fonts_url(), array(), null );
 
 	// Theme reset stylesheet
-	wp_enqueue_style( 'penscratch-2-reset', get_theme_file_uri( '/css/reset.css' ), array( 'penscratch-2-style' ), '1.0' );
+	wp_enqueue_style( 'penscratch-2-reset', get_theme_file_uri( '/css/reset.css' ), array(), '1.0' );
+
+	// Theme form styles
+	wp_enqueue_style( 'penscratch-2-reset', get_theme_file_uri( '/css/forms.css' ), array(), '1.0' );
 
 	// Theme block stylesheet.
 	wp_enqueue_style( 'penscratch-2-block-style', get_theme_file_uri( '/css/blocks.css' ), array( 'penscratch-2-style' ), '1.0' );

+ 0 - 202
penscratch-2/style.css

@@ -369,126 +369,6 @@ img {
 	clear: both;
 }
 
-/* =Forms
------------------------------------------------ */
-button,
-input,
-select,
-textarea {
-	margin: 0;
-	/* Addresses margins set differently in IE6/7, F3, S5, Chrome */
-
-	vertical-align: baseline;
-	/* Improves appearance and consistency in all browsers */
-
-	*vertical-align: middle;
-	/* Improves appearance and consistency in all browsers */
-}
-
-button,
-input[type='button'],
-input[type='reset'],
-input[type='submit'] {
-	cursor: pointer;
-	color: rgba(0, 0, 0, .8);
-	border: 1px solid #ccc;
-	border-color: #ccc #ccc #bbb #ccc;
-	border-radius: 3px;
-	background: #e6e6e6;
-	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 15px 17px rgba(255, 255, 255, .5), inset 0 -5px 12px rgba(0, 0, 0, .05);
-	/* Corrects inability to style clickable 'input' types in iOS */
-	text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
-	/* Improves usability and consistency of cursor style between image-type 'input' and others */
-
-	-webkit-appearance: button;
-}
-
-button:hover,
-input[type='button']:hover,
-input[type='reset']:hover,
-input[type='submit']:hover {
-	border-color: #ccc #bbb #aaa #bbb;
-	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 15px 17px rgba(255, 255, 255, .8), inset 0 -5px 12px rgba(0, 0, 0, .02);
-}
-
-button:focus,
-input[type='button']:focus,
-input[type='reset']:focus,
-input[type='submit']:focus,
-button:active,
-input[type='button']:active,
-input[type='reset']:active,
-input[type='submit']:active {
-	border-color: #aaa #bbb #bbb #bbb;
-	box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .5), inset 0 2px 5px rgba(0, 0, 0, .15);
-}
-
-input[type='checkbox'],
-input[type='radio'] {
-	padding: 0;
-	/* Addresses excess padding in IE8/9 */
-}
-
-input[type='search'] {
-	/* Addresses appearance set to searchfield in S5, Chrome */
-	-webkit-box-sizing: content-box;
-	/* Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof) */
-	   -moz-box-sizing: content-box;
-			box-sizing: content-box;
-			-webkit-appearance: textfield;
-}
-
-input[type='search']::-webkit-search-decoration {
-	/* Corrects inner padding displayed oddly in S5, Chrome on OSX */
-	-webkit-appearance: none;
-}
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-	padding: 0;
-	/* Corrects inner padding and border displayed oddly in FF3 www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ */
-
-	border: 0;
-}
-
-input[type='text'],
-input[type='email'],
-input[type='url'],
-input[type='password'],
-input[type='search'],
-textarea {
-	color: #666;
-	border: 1px solid #ccc;
-	border-radius: 3px;
-}
-
-input[type='text']:focus,
-input[type='email']:focus,
-input[type='url']:focus,
-input[type='password']:focus,
-input[type='search']:focus,
-textarea:focus {
-	color: #111;
-}
-
-input[type='text'],
-input[type='email'],
-input[type='url'],
-input[type='password'],
-input[type='search'] {
-	padding: 3px;
-}
-
-textarea {
-	overflow: auto;
-	/* Improves readability and alignment in all browsers */
-
-	width: 98%;
-	/* Removes default vertical scrollbar in IE6/7/8/9 */
-	padding-left: 3px;
-	vertical-align: top;
-}
-
 * html {
 	font-size: 100%;
 }
@@ -673,88 +553,6 @@ blockquote cite {
 	text-align: right;
 }
 
-button,
-input[type='button'],
-input[type='reset'],
-input[type='submit'],
-.button,
-.button:visited {
-	font-family: "Roboto Slab", Georgia, Times, serif;
-	box-sizing: border-box;
-	padding: 10px 14px;
-	-webkit-transition: all .3s ease-in-out;
-			transition: all .3s ease-in-out;
-	letter-spacing: 1px;
-	text-transform: uppercase;
-	color: #999;
-	border: 3px solid #eee;
-	background: white;
-	box-shadow: none;
-	text-shadow: none;
-}
-button:hover,
-button:focus,
-button:active,
-input[type='button']:hover,
-input[type='button']:focus,
-input[type='button']:active,
-input[type='reset']:hover,
-input[type='reset']:focus,
-input[type='reset']:active,
-input[type='submit']:hover,
-input[type='submit']:focus,
-input[type='submit']:active,
-.button:hover,
-.button:focus,
-.button:active {
-	-webkit-transition: all .3s ease-in-out;
-			transition: all .3s ease-in-out;
-	color: #1c7c7c;
-	border-color: #1c7c7c;
-	box-shadow: none;
-}
-
-input[type='text'],
-input[type='email'],
-input[type='url'],
-input[type='password'],
-input[type='search'] {
-	-webkit-box-sizing: border-box;
-	   -moz-box-sizing: border-box;
-			box-sizing: border-box;
-	max-width: 100%;
-	padding: 12px;
-	border: 1px solid #eee;
-}
-input[type='text']:active,
-input[type='text']:focus,
-input[type='email']:active,
-input[type='email']:focus,
-input[type='url']:active,
-input[type='url']:focus,
-input[type='password']:active,
-input[type='password']:focus,
-input[type='search']:active,
-input[type='search']:focus {
-	border-color: #d4d4d4;
-	outline: none;
-	background: white;
-}
-
-textarea {
-	-webkit-box-sizing: border-box;
-	   -moz-box-sizing: border-box;
-			box-sizing: border-box;
-	max-width: 100%;
-	padding: 12px;
-	border: 1px solid #eee;
-}
-textarea:active,
-textarea:focus {
-	border-color: #d4d4d4;
-	outline: none;
-}
-
 address {
 	font-style: italic;
 	margin-bottom: 27px;