-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve WooCommerce blocks styling (#70)
* Improve WooCommerce blocks styling * Remove forms mixin
- Loading branch information
1 parent
102e4b1
commit 99c4d54
Showing
20 changed files
with
2,340 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,6 +236,7 @@ ul.menu, | |
} | ||
} | ||
|
||
.menu-item { | ||
.menu-item, | ||
.page_item { | ||
position: relative; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@import "setup"; | ||
@import "woocommerce/product"; | ||
@import "woocommerce/blocks/style"; | ||
|
||
// Force add-to-cart button to be displayed without hover | ||
.wp-block-button.wc-block-grid__product-add-to-cart { | ||
opacity: 1; | ||
transform: translateY(0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
// Forms General Options | ||
|
||
// @todo more semantic for these variables | ||
$color-dark: var(--current-dark-secondary) !default; | ||
$color-white: var(--current-light-primary) !default; | ||
|
||
$input-color: var(--current-dark-secondary) !default; | ||
$input-border-color: var(--current-light-tertiary) !default; | ||
$input-border-width: .0625em !default; | ||
$input-background-color: var(--current-light-tertiary) !default; | ||
$input-padding: .8em 1.18em .93em !default; | ||
$input-focus-border-color: var(--current-dark-primary) !default; | ||
$input-focus-background-color: var(--current-light-primary) !default; | ||
$input-border-radius: 0 !default; | ||
$input-disabled-color: var(--current-dark-secondary) !default; | ||
$input-disabled-background-color: var(--current-dark-secondary) !default; | ||
$input-disabled-border-color: var(--current-dark-secondary) !default; | ||
|
||
$placeholder-color: var(--current-dark-secondary) !default; | ||
|
||
$label-color: var(--current-dark-secondary) !default; | ||
|
||
$legend-color: var(--current-dark-secondary) !default; | ||
|
||
$button-color: var(--current-light-primary) !default; | ||
$button-background-color: var(--current-dark-secondary) !default; | ||
|
||
$checkbox-color: var(--current-dark-secondary) !default; | ||
$checkbox-background-color: var(--current-light-primary) !default; | ||
$checkbox-width: 1.5rem !default; | ||
$checkbox-height: 1.5rem !default; | ||
|
||
// Spacing | ||
$input-vertical-spacing: var(--theme-spacing-tiny) !default; | ||
$input-horizontal-spacing: var(--theme-spacing-tiny) !default; // Checkboxes and Radios | ||
|
||
@mixin field { | ||
width: 100%; | ||
height: auto; | ||
max-width: 100%; | ||
padding: $input-padding; | ||
border: $input-border-width solid $input-border-color; | ||
|
||
color: $input-color; | ||
border-radius: $input-border-radius; | ||
background-color: $input-background-color; | ||
|
||
font: inherit; | ||
line-height: 1.5; | ||
-webkit-font-smoothing: initial; | ||
-webkit-appearance: none; | ||
|
||
&:focus, | ||
&:active { | ||
outline: 0; | ||
box-shadow: none; | ||
border-color: $input-focus-border-color; | ||
} | ||
|
||
&[disabled] { | ||
border-color: $input-disabled-border-color; | ||
background-color: $input-disabled-background-color; | ||
} | ||
} | ||
|
||
|
||
@mixin input { | ||
@include field; | ||
} | ||
|
||
@mixin textarea { | ||
@include field; | ||
|
||
min-height: 7.5em; | ||
resize: vertical; | ||
} | ||
|
||
@mixin select { | ||
@include field; | ||
|
||
padding-right: 3.125em; | ||
|
||
background-color: var(--current-light-tertiary); | ||
background-image: url("assets/images/arrow-caret.svg"); | ||
background-position: calc(100% - 17px) center; | ||
background-repeat: no-repeat; | ||
background-size: .56em .312em; | ||
|
||
-webkit-appearance: none; | ||
} | ||
|
||
@mixin label { | ||
color: $label-color; | ||
font: inherit; | ||
margin: 0; | ||
|
||
&:not(:first-child) { | ||
margin-top: $input-vertical-spacing; | ||
} | ||
|
||
&:not(:last-child) { | ||
margin-bottom: $input-vertical-spacing; | ||
} | ||
|
||
cursor: pointer; | ||
} | ||
|
||
@mixin checkbox-base { | ||
position: relative; | ||
left: 0; | ||
|
||
float: left; | ||
clear: left; | ||
|
||
border: $input-border-width solid $input-border-color; | ||
border-radius: $input-border-radius; | ||
|
||
width: $checkbox-width !important; | ||
height: $checkbox-height !important; | ||
margin-right: $input-horizontal-spacing; | ||
margin-bottom: $input-vertical-spacing; | ||
|
||
background-color: $color-white; | ||
cursor: pointer; | ||
|
||
-webkit-appearance: none; | ||
} | ||
|
||
@mixin checkbox { | ||
@include checkbox-base; | ||
|
||
&:checked { | ||
border-color: $checkbox-color; | ||
background: $checkbox-background-color url('assets/images/checkbox.svg') center center no-repeat; | ||
background-size: 100% 100%; | ||
outline: 0; | ||
} | ||
} | ||
|
||
@mixin radio { | ||
@include checkbox-base; | ||
border-radius: 50%; | ||
|
||
&:checked { | ||
border: .43em solid $checkbox-color; | ||
outline: 0; | ||
} | ||
} |
Oops, something went wrong.