Morden: Updating WC styles to work with menu refeactor in #1578.

This commit is contained in:
Allan Cole 2019-10-30 17:51:59 -04:00
parent 917ecf65af
commit eba072fcee
8 changed files with 4783 additions and 175 deletions

View file

@ -36,7 +36,9 @@
"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: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:woocommerce-rtl": "rtlcss style-woocommerce.css style-woocommerce-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:*\"",
"watch": "chokidar \"**/*.scss\" -c \"npm run build\" --initial"

View file

@ -92,6 +92,12 @@ $config-global: (
"light": #F8F8F8,
"dark": #A5A5A5,
),
"alert": (
"success": #4caf50,
"info": #2196f3,
"warning": #ffc107,
"error": #CD2220,
),
"text-selection": #FDE2D4,
"black": black,
"white": white,

View file

@ -0,0 +1,55 @@
/**
* Redefine Sass map values for child theme WooCommerce output.
*/
$config-woocommerce: (
/* Wrapper Width - accepts full, wide, or defuault */
"wrapper-width": wide,
/* 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": (
"background": map-deep-get($config-global, "color", "foreground", "default"),
"border": map-deep-get($config-global, "color", "border", "dark"),
"text": map-deep-get($config-global, "color", "background", "default"),
"subtotal": map-deep-get($config-global, "color", "background", "default"),
"count": map-deep-get($config-global, "color", "background", "default"),
),
/* Button */
"button": (
"color": map-deep-get($config-button, "color", "text"),
"background-color": map-deep-get($config-button, "color", "background"),
),
"width": #{25 * map-deep-get($config-global, "spacing", "unit")},
),
/* Star Rating */
"star-rating": (
/* Color */
"color": map-deep-get($config-global, "color", "alert", "warning"),
),
);

View file

@ -0,0 +1,86 @@
/**
* WooCommerce Styles
* - These styles should only be loaded when WooCommerce is active
*/
/**
* Abstracts
* - Functions and config
*/
@import "../../varia/sass/abstracts/functions";
@import "../../varia/sass/abstracts/config-global";
/**
* Child Theme Name Config
*/
@import "config-child-theme-deep";
/**
* WooCommerce Config
*/
@import "config-child-theme-woocommerce";
/**
* Varia Mixins
*/
@import "../../varia/sass/abstracts/mixins";
/**
* Varia Responsive Logic
*/
@import "../../varia/sass/abstracts/responsive-logic";
/**
* Varia Extends
*/
@import "../../varia/sass/base/extends";
/**
* WooCommerce Styles
*/
@import "../../varia/sass/vendors/woocommerce/style";
// Fix menu positioning
body[class*="woocommerce"] #page {
.woocommerce-products-header .page-title {
background-color: transparent;
}
.main-navigation {
@include media(mobile) {
text-align: right;
& > div {
text-align: left;
}
& > div:not(:last-of-type) {
margin-right: 0;
}
& > div:last-of-type {
margin-left: (2 * map-deep-get($config-global, "spacing", "unit"));
}
}
}
}
/**
* Mobile-Menu
*/
body[class*="woocommerce"] #page .main-navigation #woocommerce-toggle:focus + #toggle-cart,
body[class*="woocommerce"] #page #toggle-cart {
background: map-deep-get($config-global, "color", "background", "default");
color: map-deep-get($config-global, "color", "foreground", "default");
text-decoration: none;
&:active,
&:focus,
&:hover {
background: map-deep-get($config-global, "color", "primary", "default");
color: map-deep-get($config-global, "color", "background", "default");
}
}

View file

@ -188,6 +188,84 @@ $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: bold;
font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-family: var(--font-base, "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
font-size: 1rem;
background-color: #CD2220;
border-radius: 5px;
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: #303030;
}
/**
* 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
========================================================================== */
@ -859,7 +937,8 @@ footer {
.post-thumbnail > *,
.page-content > *,
.comment-content > *,
.author-bio > * {
.author-bio > *,
.widget-area > .widget > * {
margin-top: 16px;
margin-bottom: 16px;
}
@ -869,7 +948,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;
}
@ -878,7 +958,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;
}
@ -1069,77 +1150,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: bold;
font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-family: var(--font-base, "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
font-size: 1rem;
background-color: #CD2220;
border-radius: 5px;
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: #303030;
}
/**
* Block Options
*/
@ -2405,7 +2417,7 @@ body:not(.fse-enabled) .site-description {
margin: 0;
}
.main-navigation #toggle:checked ~ div {
.main-navigation #toggle:checked ~ div:not(.woocommerce-menu-container) {
display: block;
}
@ -2429,7 +2441,7 @@ body:not(.fse-enabled) .site-description {
@media only screen and (min-width: 560px) {
.main-navigation > div {
display: block;
display: inline-block;
}
.main-navigation #toggle-menu {
display: none;
@ -2461,11 +2473,6 @@ body:not(.fse-enabled) .site-description {
z-index: 1;
}
.main-navigation > div > ul li:hover, .main-navigation > div > ul li[focus-within] {
cursor: pointer;
z-index: 99999;
}
.main-navigation > div > ul li:hover, .main-navigation > div > ul li:focus-within {
cursor: pointer;
z-index: 99999;
@ -2478,14 +2485,6 @@ body:not(.fse-enabled) .site-description {
/* Submenu display */
}
.main-navigation > div > ul li:hover > ul,
.main-navigation > div > ul li[focus-within] > ul,
.main-navigation > div > ul li ul:hover,
.main-navigation > div > ul li ul:focus {
visibility: visible;
opacity: 1;
display: block;
}
.main-navigation > div > ul li:hover > ul,
.main-navigation > div > ul li:focus-within > ul,
.main-navigation > div > ul li ul:hover,
.main-navigation > div > ul li ul:focus {
@ -2815,6 +2814,13 @@ body:not(.fse-enabled) .footer-menu a {
.entry-content .more-link {
display: block;
color: inherit;
margin-top: 16px;
}
@media only screen and (min-width: 560px) {
.entry-content .more-link {
margin-top: 32px;
}
}
.entry-content .more-link:after {
@ -3014,12 +3020,6 @@ body:not(.fse-enabled) .footer-menu a {
max-width: calc(100% - 48px);
}
.comment-meta .comment-author {
line-height: 1.125;
margin-bottom: 4px;
padding-left: 40px;
}
@media only screen and (min-width: 560px) {
.comment-meta .comment-author {
display: flex;

File diff suppressed because it is too large Load diff

2223
morden/style-woocommerce.css Normal file

File diff suppressed because it is too large Load diff

View file

@ -188,6 +188,84 @@ $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: bold;
font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-family: var(--font-base, "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
font-size: 1rem;
background-color: #CD2220;
border-radius: 5px;
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: #303030;
}
/**
* 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
========================================================================== */
@ -859,7 +937,8 @@ footer {
.post-thumbnail > *,
.page-content > *,
.comment-content > *,
.author-bio > * {
.author-bio > *,
.widget-area > .widget > * {
margin-top: 16px;
margin-bottom: 16px;
}
@ -869,7 +948,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;
}
@ -878,7 +958,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;
}
@ -1069,77 +1150,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: bold;
font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-family: var(--font-base, "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
font-size: 1rem;
background-color: #CD2220;
border-radius: 5px;
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: #303030;
}
/**
* Block Options
*/
@ -2422,7 +2434,7 @@ body:not(.fse-enabled) .site-description {
margin: 0;
}
.main-navigation #toggle:checked ~ div {
.main-navigation #toggle:checked ~ div:not(.woocommerce-menu-container) {
display: block;
}
@ -2446,7 +2458,7 @@ body:not(.fse-enabled) .site-description {
@media only screen and (min-width: 560px) {
.main-navigation > div {
display: block;
display: inline-block;
}
.main-navigation #toggle-menu {
display: none;
@ -2832,6 +2844,13 @@ body:not(.fse-enabled) .footer-menu a {
.entry-content .more-link {
display: block;
color: inherit;
margin-top: 16px;
}
@media only screen and (min-width: 560px) {
.entry-content .more-link {
margin-top: 32px;
}
}
.entry-content .more-link:after {
@ -3031,12 +3050,6 @@ body:not(.fse-enabled) .footer-menu a {
max-width: calc(100% - 48px);
}
.comment-meta .comment-author {
line-height: 1.125;
margin-bottom: 4px;
padding-right: 40px;
}
@media only screen and (min-width: 560px) {
.comment-meta .comment-author {
display: flex;