Shawburn: Add WooCommerce support.

This commit is contained in:
Allan Cole 2019-10-16 16:52:30 -04:00
parent 9d9a1c2d3a
commit a69345d027
8 changed files with 2127 additions and 159 deletions

View file

@ -36,6 +36,7 @@
"start": "chokidar \"**/*.scss\" -c \"npm run build\" --initial",
"build:style": "node-sass sass/style-child-theme.scss style.css --output-style expanded --indent-type tab --indent-width 1 && postcss -r style.css",
"build:style-editor": "node-sass sass/style-child-theme-editor.scss style-editor.css --output-style expanded --indent-type tab --indent-width 1 && postcss -r style-editor.css",
"build:style-woocommerce": "node-sass sass/style-child-theme-woocommerce.scss style-woocommerce.css --output-style expanded --indent-type tab --indent-width 1 && postcss -r style-woocommerce.css",
"build:rtl": "rtlcss style.css style-rtl.css",
"build:print": "node-sass sass/print.scss print.css --output-style expanded --indent-type tab --indent-width 1 && postcss -r print.css",
"build": "run-p \"build:*\"",

View file

@ -83,6 +83,12 @@ $config-global: (
"light": #FAFAFA,
"dark": #DADADA,
),
"alert": (
"success": yellowgreen,
"info": skyblue,
"warning": gold,
"error": salmon,
),
"text-selection": lighten(#0C80A1, 55%),
"black": black,
"white": white,

View file

@ -0,0 +1,48 @@
/**
* Redefine Sass map values for child theme WooCommerce output.
*/
$config-woocommerce: (
/* Tables */
"table": (
/* Borders */
"border": (
"color": map-deep-get($config-global, "color", "border", "default"),
"radius": 0,
"width": 1px,
),
"padding": map-deep-get($config-global, "spacing", "unit"),
),
/* Tabs */
"tabs": (
/* Borders */
"border": (
"color": map-deep-get($config-global, "color", "border", "default"),
"radius": 10px,
"width": 1px,
),
"padding": map-deep-get($config-global, "spacing", "horizontal"),
),
/* Mini cart */
"mini-cart": (
/* Color */
"color": (
"subtotal": map-deep-get($config-global, "color", "white"),
"count": map-deep-get($config-global, "color", "white"),
),
/* Button */
"button": (
"color": map-deep-get($config-global, "color", "primary", "default"),
"background-color": map-deep-get($config-global, "color", "white"),
),
),
/* Star Rating */
"star-rating": (
/* Color */
"color": map-deep-get($config-global, "color", "alert", "warning"),
),
);

View file

@ -0,0 +1,35 @@
/**
* WooCommerce Styles
* - These styles should be loaded when WooCommerce is active
*/
/**
* Abstracts
* - Functions and config
*/
@import "../../varia/sass/abstracts/functions";
/**
* Shawburn Config
*/
@import "config-child-theme-deep";
/**
* WooCommerce Config
*/
@import "config-child-theme-woocommerce";
/**
* Varia Mixins
*/
@import "../../varia/sass/abstracts/mixins";
/**
* Varia Extends
*/
@import "../../varia/sass/base/extends";
/**
* WooCommerce Styles
*/
@import "../../varia/sass/vendors/woocommerce/style";

View file

@ -26,7 +26,9 @@ Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
* Abstracts
* - Mixins, variables and functions
*/
@import "../../varia/sass/abstracts/imports";
@import "../../varia/sass/abstracts/functions";
@import "../../varia/sass/abstracts/config-global";
@import "../../varia/sass/abstracts/mixins";
/**
* Child Theme Name

View file

@ -22,10 +22,6 @@ Underscores is distributed under the terms of the GNU GPL v2 or later.
Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/
/**
* Abstracts
* - Mixins, variables and functions
*/
/**
* Abstracts
* - Mixins, variables and functions
@ -184,6 +180,83 @@ $grid-configuration: map-extend($grid-configuration-default, $grid-configuration
* Base
* - Reset the browser
*/
/**
* Button Placeholder style
* - Since buttons appear in various blocks,
* lets use a placeholder to keep them all
* in-sync
*/
button,
.button,
input[type="submit"],
.wp-block-button__link,
.wp-block-file__button, .a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept {
line-height: 1;
color: white;
cursor: pointer;
font-weight: 700;
font-family: "PT Sans", Arial, sans-serif;
font-size: 0.83333rem;
background-color: #0C80A1;
border-radius: 4px;
border-width: 0;
padding: 16px 24px;
}
button:before,
.button:before,
input[type="submit"]:before,
.wp-block-button__link:before,
.wp-block-file__button:before, .a8c-posts-list__view-all:before, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:before, button:after,
.button:after,
input[type="submit"]:after,
.wp-block-button__link:after,
.wp-block-file__button:after, .a8c-posts-list__view-all:after, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:after {
content: '';
display: block;
height: 0;
width: 0;
}
button:before,
.button:before,
input[type="submit"]:before,
.wp-block-button__link:before,
.wp-block-file__button:before, .a8c-posts-list__view-all:before, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:before {
margin-bottom: -0.12em;
}
button:after,
.button:after,
input[type="submit"]:after,
.wp-block-button__link:after,
.wp-block-file__button:after, .a8c-posts-list__view-all:after, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:after {
margin-top: -0.11em;
}
button:hover,
.button:hover,
input:hover[type="submit"],
.wp-block-button__link:hover,
.wp-block-file__button:hover, .a8c-posts-list__view-all:hover, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover, button:focus,
.button:focus,
input:focus[type="submit"],
.wp-block-button__link:focus,
.wp-block-file__button:focus, .a8c-posts-list__view-all:focus, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus, button.has-focus,
.has-focus.button,
input.has-focus[type="submit"],
.has-focus.wp-block-button__link,
.has-focus.wp-block-file__button, .has-focus.a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept {
color: white;
background-color: #085a72;
}
/**
* Onsale Placeholder style
* - Since buttons appear in various blocks,
* lets use a placeholder to keep them all
* in-sync
*/
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
@ -856,7 +929,8 @@ footer {
.post-thumbnail > *,
.page-content > *,
.comment-content > *,
.author-bio > * {
.author-bio > *,
.widget-area > .widget > * {
margin-top: 16px;
margin-bottom: 16px;
}
@ -866,7 +940,8 @@ footer {
.post-thumbnail > *:first-child,
.page-content > *:first-child,
.comment-content > *:first-child,
.author-bio > *:first-child {
.author-bio > *:first-child,
.widget-area > .widget > *:first-child {
margin-top: 0;
}
@ -875,7 +950,8 @@ footer {
.post-thumbnail > *:last-child,
.page-content > *:last-child,
.comment-content > *:last-child,
.author-bio > *:last-child {
.author-bio > *:last-child,
.widget-area > .widget > *:last-child {
margin-bottom: 0;
}
@ -1066,76 +1142,8 @@ object {
}
/**
* Placeholder button style
* - Since buttons appear in various blocks,
* lets use a placeholder to keep them all
* in-sync
* Button
*/
button,
.button,
input[type="submit"],
.wp-block-button__link,
.wp-block-file__button, .a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept {
line-height: 1;
color: white;
cursor: pointer;
font-weight: 700;
font-family: "PT Sans", Arial, sans-serif;
font-size: 0.83333rem;
background-color: #0C80A1;
border-radius: 4px;
border-width: 0;
padding: 16px 24px;
}
button:before,
.button:before,
input[type="submit"]:before,
.wp-block-button__link:before,
.wp-block-file__button:before, .a8c-posts-list__view-all:before, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:before, button:after,
.button:after,
input[type="submit"]:after,
.wp-block-button__link:after,
.wp-block-file__button:after, .a8c-posts-list__view-all:after, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:after {
content: '';
display: block;
height: 0;
width: 0;
}
button:before,
.button:before,
input[type="submit"]:before,
.wp-block-button__link:before,
.wp-block-file__button:before, .a8c-posts-list__view-all:before, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:before {
margin-bottom: -0.12em;
}
button:after,
.button:after,
input[type="submit"]:after,
.wp-block-button__link:after,
.wp-block-file__button:after, .a8c-posts-list__view-all:after, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:after {
margin-top: -0.11em;
}
button:hover,
.button:hover,
input:hover[type="submit"],
.wp-block-button__link:hover,
.wp-block-file__button:hover, .a8c-posts-list__view-all:hover, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover, button:focus,
.button:focus,
input:focus[type="submit"],
.wp-block-button__link:focus,
.wp-block-file__button:focus, .a8c-posts-list__view-all:focus, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus, button.has-focus,
.has-focus.button,
input.has-focus[type="submit"],
.has-focus.wp-block-button__link,
.has-focus.wp-block-file__button, .has-focus.a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept {
color: white;
background-color: #085a72;
}
/**
* Block Options
*/
@ -2945,19 +2953,19 @@ table th,
margin-bottom: 32px;
}
.children {
.comment-list .children {
list-style: none;
padding-right: 16px;
}
.children > li {
.comment-list .children > li {
border-top: 1px solid #EAEAEA;
margin-top: 32px;
margin-bottom: 32px;
}
@media only screen and (min-width: 560px) {
.children {
.comment-list .children {
padding-right: 32px;
}
}

File diff suppressed because it is too large Load diff

View file

@ -22,10 +22,6 @@ Underscores is distributed under the terms of the GNU GPL v2 or later.
Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/
/**
* Abstracts
* - Mixins, variables and functions
*/
/**
* Abstracts
* - Mixins, variables and functions
@ -184,6 +180,83 @@ $grid-configuration: map-extend($grid-configuration-default, $grid-configuration
* Base
* - Reset the browser
*/
/**
* Button Placeholder style
* - Since buttons appear in various blocks,
* lets use a placeholder to keep them all
* in-sync
*/
button,
.button,
input[type="submit"],
.wp-block-button__link,
.wp-block-file__button, .a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept {
line-height: 1;
color: white;
cursor: pointer;
font-weight: 700;
font-family: "PT Sans", Arial, sans-serif;
font-size: 0.83333rem;
background-color: #0C80A1;
border-radius: 4px;
border-width: 0;
padding: 16px 24px;
}
button:before,
.button:before,
input[type="submit"]:before,
.wp-block-button__link:before,
.wp-block-file__button:before, .a8c-posts-list__view-all:before, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:before, button:after,
.button:after,
input[type="submit"]:after,
.wp-block-button__link:after,
.wp-block-file__button:after, .a8c-posts-list__view-all:after, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:after {
content: '';
display: block;
height: 0;
width: 0;
}
button:before,
.button:before,
input[type="submit"]:before,
.wp-block-button__link:before,
.wp-block-file__button:before, .a8c-posts-list__view-all:before, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:before {
margin-bottom: -0.12em;
}
button:after,
.button:after,
input[type="submit"]:after,
.wp-block-button__link:after,
.wp-block-file__button:after, .a8c-posts-list__view-all:after, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:after {
margin-top: -0.11em;
}
button:hover,
.button:hover,
input:hover[type="submit"],
.wp-block-button__link:hover,
.wp-block-file__button:hover, .a8c-posts-list__view-all:hover, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover, button:focus,
.button:focus,
input:focus[type="submit"],
.wp-block-button__link:focus,
.wp-block-file__button:focus, .a8c-posts-list__view-all:focus, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus, button.has-focus,
.has-focus.button,
input.has-focus[type="submit"],
.has-focus.wp-block-button__link,
.has-focus.wp-block-file__button, .has-focus.a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept {
color: white;
background-color: #085a72;
}
/**
* Onsale Placeholder style
* - Since buttons appear in various blocks,
* lets use a placeholder to keep them all
* in-sync
*/
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
@ -856,7 +929,8 @@ footer {
.post-thumbnail > *,
.page-content > *,
.comment-content > *,
.author-bio > * {
.author-bio > *,
.widget-area > .widget > * {
margin-top: 16px;
margin-bottom: 16px;
}
@ -866,7 +940,8 @@ footer {
.post-thumbnail > *:first-child,
.page-content > *:first-child,
.comment-content > *:first-child,
.author-bio > *:first-child {
.author-bio > *:first-child,
.widget-area > .widget > *:first-child {
margin-top: 0;
}
@ -875,7 +950,8 @@ footer {
.post-thumbnail > *:last-child,
.page-content > *:last-child,
.comment-content > *:last-child,
.author-bio > *:last-child {
.author-bio > *:last-child,
.widget-area > .widget > *:last-child {
margin-bottom: 0;
}
@ -1066,76 +1142,8 @@ object {
}
/**
* Placeholder button style
* - Since buttons appear in various blocks,
* lets use a placeholder to keep them all
* in-sync
* Button
*/
button,
.button,
input[type="submit"],
.wp-block-button__link,
.wp-block-file__button, .a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept {
line-height: 1;
color: white;
cursor: pointer;
font-weight: 700;
font-family: "PT Sans", Arial, sans-serif;
font-size: 0.83333rem;
background-color: #0C80A1;
border-radius: 4px;
border-width: 0;
padding: 16px 24px;
}
button:before,
.button:before,
input[type="submit"]:before,
.wp-block-button__link:before,
.wp-block-file__button:before, .a8c-posts-list__view-all:before, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:before, button:after,
.button:after,
input[type="submit"]:after,
.wp-block-button__link:after,
.wp-block-file__button:after, .a8c-posts-list__view-all:after, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:after {
content: '';
display: block;
height: 0;
width: 0;
}
button:before,
.button:before,
input[type="submit"]:before,
.wp-block-button__link:before,
.wp-block-file__button:before, .a8c-posts-list__view-all:before, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:before {
margin-bottom: -0.12em;
}
button:after,
.button:after,
input[type="submit"]:after,
.wp-block-button__link:after,
.wp-block-file__button:after, .a8c-posts-list__view-all:after, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:after {
margin-top: -0.11em;
}
button:hover,
.button:hover,
input:hover[type="submit"],
.wp-block-button__link:hover,
.wp-block-file__button:hover, .a8c-posts-list__view-all:hover, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover, button:focus,
.button:focus,
input:focus[type="submit"],
.wp-block-button__link:focus,
.wp-block-file__button:focus, .a8c-posts-list__view-all:focus, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus, button.has-focus,
.has-focus.button,
input.has-focus[type="submit"],
.has-focus.wp-block-button__link,
.has-focus.wp-block-file__button, .has-focus.a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept {
color: white;
background-color: #085a72;
}
/**
* Block Options
*/
@ -2962,19 +2970,19 @@ table th,
margin-bottom: 32px;
}
.children {
.comment-list .children {
list-style: none;
padding-left: 16px;
}
.children > li {
.comment-list .children > li {
border-top: 1px solid #EAEAEA;
margin-top: 32px;
margin-bottom: 32px;
}
@media only screen and (min-width: 560px) {
.children {
.comment-list .children {
padding-left: 32px;
}
}