Maggie Cabrera пре 4 година
родитељ
комит
398f2c3bb4

+ 38 - 0
spearhead/assets/sass/_accesibility.scss

@@ -0,0 +1,38 @@
+/* Text meant only for screen readers. */
+.screen-reader-text {
+	border: 0;
+	clip: rect(1px, 1px, 1px, 1px);
+	clip-path: inset(50%);
+	height: 1px;
+	margin: -1px;
+	overflow: hidden;
+	padding: 0;
+	position: absolute !important;
+	width: 1px;
+	word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
+
+	&:focus {
+		background-color: var(--global--color-background);
+		border-radius: 3px;
+		box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
+		clip: auto !important;
+		clip-path: none;
+		color: var(--global--color-foreground);
+		display: block;
+		font-size: var(--global--font-size-md);
+		font-weight: bold;
+		height: auto;
+		left: 5px;
+		line-height: normal;
+		padding: 15px 23px 14px;
+		text-decoration: none;
+		top: 5px;
+		width: auto;
+		z-index: 100000; /* Above WP toolbar. */
+	}
+}
+
+/* Do not show the outline on the skip link target. */
+#content[tabindex="-1"]:focus {
+	outline: 0;
+}

+ 19 - 0
spearhead/assets/sass/_forms.scss

@@ -0,0 +1,19 @@
+input[type="text"], 
+input[type="email"], 
+input[type="url"], 
+input[type="password"], 
+input[type="search"], 
+input[type="number"], 
+input[type="tel"], 
+input[type="range"], 
+input[type="date"], 
+input[type="month"], 
+input[type="week"], 
+input[type="time"], 
+input[type="datetime"], 
+input[type="datetime-local"], 
+input[type="color"], 
+textarea {
+    background: transparent;
+    box-shadow: none;
+}

+ 49 - 0
spearhead/assets/sass/_search.scss

@@ -3,6 +3,11 @@
         padding: var(--global--spacing-vertical) 0;
     }
 
+    .search-form {
+        padding-bottom: 0;
+        margin-bottom: calc( 3* var(--global--spacing-vertical));
+    }
+
     .entry-title {
         font-size: var(--heading--font-size-h2);
     }
@@ -11,3 +16,47 @@
         margin-bottom: 0;
     }
 }
+
+.search-form {
+    border-bottom: var(--form--border-width) solid var(--form--border-color);
+    flex-direction: row-reverse;
+
+    & > label {
+        margin-right: 0;
+        padding-left: 30px;
+        position: relative;
+        &:before {
+            content: "";
+            position: absolute;
+            top: 0;
+            left: 0;
+            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='search-icon' class='search-icon' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath d='M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z'%3E%3C/path%3E%3C/svg%3E");
+            background-repeat: no-repeat;
+            background-position: center center;
+            width: 24px;
+            height: 100%;
+        }
+    }
+    input[type="search"] {
+        border: none;
+        padding-top: 0;
+        padding-bottom: 0;
+        font-size: var(--global--font-size-sm);
+        color: var(--entry-header--color);
+    }
+    input[type="submit"] {
+        background: none;
+        color: var(--entry-header--color);
+        @extend .screen-reader-text;
+    }
+}
+
+@media ( prefers-color-scheme: dark ) {
+    .search-form {
+        & > label {
+            &:before {
+                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='search-icon' class='search-icon' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23ffffff' d='M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z'%3E%3C/path%3E%3C/svg%3E");
+            }
+        }
+    }
+}

+ 2 - 0
spearhead/assets/sass/style.scss

@@ -16,9 +16,11 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 @import "../../../seedlet/assets/sass/abstracts/mixins";
 @import "breakpoints";
 @import "responsive";
+@import "accesibility";
 @import "posts-and-pages";
 @import "text";
 @import "header";
 @import "block-extends";
 @import "search";
 @import "meta";
+@import "forms";

+ 1 - 1
spearhead/search.php

@@ -4,7 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
  *
- * @package Seedlet
+ * @package Spearhead
  * @since 1.0.0
  */
 

+ 108 - 0
spearhead/style-rtl.css

@@ -30,6 +30,47 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	}
 }
 
+/* Text meant only for screen readers. */
+.screen-reader-text, .search-form input[type="submit"] {
+	border: 0;
+	clip: rect(1px, 1px, 1px, 1px);
+	clip-path: inset(50%);
+	height: 1px;
+	margin: -1px;
+	overflow: hidden;
+	padding: 0;
+	position: absolute !important;
+	width: 1px;
+	word-wrap: normal !important;
+	/* Many screen reader and browser combinations announce broken words as they would appear visually. */
+}
+
+.screen-reader-text:focus, .search-form input:focus[type="submit"] {
+	background-color: var(--global--color-background);
+	border-radius: 3px;
+	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
+	clip: auto !important;
+	clip-path: none;
+	color: var(--global--color-foreground);
+	display: block;
+	font-size: var(--global--font-size-md);
+	font-weight: bold;
+	height: auto;
+	right: 5px;
+	line-height: normal;
+	padding: 15px 23px 14px;
+	text-decoration: none;
+	top: 5px;
+	width: auto;
+	z-index: 100000;
+	/* Above WP toolbar. */
+}
+
+/* Do not show the outline on the skip link target. */
+#content[tabindex="-1"]:focus {
+	outline: 0;
+}
+
 .archive .post .entry-title,
 .home .post .entry-title {
 	font-size: var(--global--font-size-lg);
@@ -314,6 +355,11 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	padding: var(--global--spacing-vertical) 0;
 }
 
+.search-results .search-form {
+	padding-bottom: 0;
+	margin-bottom: calc( 3* var(--global--spacing-vertical));
+}
+
 .search-results .entry-title {
 	font-size: var(--heading--font-size-h2);
 }
@@ -322,8 +368,70 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	margin-bottom: 0;
 }
 
+.search-form {
+	border-bottom: var(--form--border-width) solid var(--form--border-color);
+	flex-direction: row-reverse;
+}
+
+.search-form > label {
+	margin-left: 0;
+	padding-right: 30px;
+	position: relative;
+}
+
+.search-form > label:before {
+	content: "";
+	position: absolute;
+	top: 0;
+	right: 0;
+	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='search-icon' class='search-icon' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath d='M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z'%3E%3C/path%3E%3C/svg%3E");
+	background-repeat: no-repeat;
+	background-position: center center;
+	width: 24px;
+	height: 100%;
+}
+
+.search-form input[type="search"] {
+	border: none;
+	padding-top: 0;
+	padding-bottom: 0;
+	font-size: var(--global--font-size-sm);
+	color: var(--entry-header--color);
+}
+
+.search-form input[type="submit"] {
+	background: none;
+	color: var(--entry-header--color);
+}
+
+@media (prefers-color-scheme: dark) {
+	.search-form > label:before {
+		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='search-icon' class='search-icon' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23ffffff' d='M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z'%3E%3C/path%3E%3C/svg%3E");
+	}
+}
+
 .site-main > article > .entry-footer {
 	margin-top: calc( var(--global--spacing-vertical) / 2);
 	padding-top: 0;
 	border: none;
+}
+
+input[type="text"],
+input[type="email"],
+input[type="url"],
+input[type="password"],
+input[type="search"],
+input[type="number"],
+input[type="tel"],
+input[type="range"],
+input[type="date"],
+input[type="month"],
+input[type="week"],
+input[type="time"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="color"],
+textarea {
+	background: transparent;
+	box-shadow: none;
 }

+ 108 - 0
spearhead/style.css

@@ -30,6 +30,47 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	}
 }
 
+/* Text meant only for screen readers. */
+.screen-reader-text, .search-form input[type="submit"] {
+	border: 0;
+	clip: rect(1px, 1px, 1px, 1px);
+	clip-path: inset(50%);
+	height: 1px;
+	margin: -1px;
+	overflow: hidden;
+	padding: 0;
+	position: absolute !important;
+	width: 1px;
+	word-wrap: normal !important;
+	/* Many screen reader and browser combinations announce broken words as they would appear visually. */
+}
+
+.screen-reader-text:focus, .search-form input:focus[type="submit"] {
+	background-color: var(--global--color-background);
+	border-radius: 3px;
+	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
+	clip: auto !important;
+	clip-path: none;
+	color: var(--global--color-foreground);
+	display: block;
+	font-size: var(--global--font-size-md);
+	font-weight: bold;
+	height: auto;
+	left: 5px;
+	line-height: normal;
+	padding: 15px 23px 14px;
+	text-decoration: none;
+	top: 5px;
+	width: auto;
+	z-index: 100000;
+	/* Above WP toolbar. */
+}
+
+/* Do not show the outline on the skip link target. */
+#content[tabindex="-1"]:focus {
+	outline: 0;
+}
+
 .archive .post .entry-title,
 .home .post .entry-title {
 	font-size: var(--global--font-size-lg);
@@ -314,6 +355,11 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	padding: var(--global--spacing-vertical) 0;
 }
 
+.search-results .search-form {
+	padding-bottom: 0;
+	margin-bottom: calc( 3* var(--global--spacing-vertical));
+}
+
 .search-results .entry-title {
 	font-size: var(--heading--font-size-h2);
 }
@@ -322,10 +368,72 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	margin-bottom: 0;
 }
 
+.search-form {
+	border-bottom: var(--form--border-width) solid var(--form--border-color);
+	flex-direction: row-reverse;
+}
+
+.search-form > label {
+	margin-right: 0;
+	padding-left: 30px;
+	position: relative;
+}
+
+.search-form > label:before {
+	content: "";
+	position: absolute;
+	top: 0;
+	left: 0;
+	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='search-icon' class='search-icon' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath d='M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z'%3E%3C/path%3E%3C/svg%3E");
+	background-repeat: no-repeat;
+	background-position: center center;
+	width: 24px;
+	height: 100%;
+}
+
+.search-form input[type="search"] {
+	border: none;
+	padding-top: 0;
+	padding-bottom: 0;
+	font-size: var(--global--font-size-sm);
+	color: var(--entry-header--color);
+}
+
+.search-form input[type="submit"] {
+	background: none;
+	color: var(--entry-header--color);
+}
+
+@media (prefers-color-scheme: dark) {
+	.search-form > label:before {
+		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='search-icon' class='search-icon' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23ffffff' d='M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z'%3E%3C/path%3E%3C/svg%3E");
+	}
+}
+
 .site-main > article > .entry-footer {
 	margin-top: calc( var(--global--spacing-vertical) / 2);
 	padding-top: 0;
 	border: none;
 }
 
+input[type="text"],
+input[type="email"],
+input[type="url"],
+input[type="password"],
+input[type="search"],
+input[type="number"],
+input[type="tel"],
+input[type="range"],
+input[type="date"],
+input[type="month"],
+input[type="week"],
+input[type="time"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="color"],
+textarea {
+	background: transparent;
+	box-shadow: none;
+}
+
 /*# sourceMappingURL=style.css.map */

Разлика између датотеке није приказан због своје велике величине
+ 3 - 1
spearhead/style.css.map


+ 6 - 0
spearhead/variables.css

@@ -83,6 +83,12 @@
 	--sticky-posts--color-background: #F9F9F9;
 	--sticky-posts--entry-title-font-size: 24px;
 	--sticky-posts--entry-content-font-size: 20px;
+
+	/* Forms */
+	--form--border-color: var(--global--color-secondary);
+	--form--border-width: 1px;
+	--button--padding-vertical: calc(6px - var(--button--border-width));
+	--button--padding-horizontal: var(--global--spacing-horizontal);
 }
 
 @media ( prefers-color-scheme: dark ) {

Неке датотеке нису приказане због велике количине промена