woocommerce/plugins/woocommerce-blocks/assets/css/gutenberg-products-block.scss

377 lines
5.7 KiB
SCSS
Raw Normal View History

/**
* Right now these are basic layout/placeholder styles for dev + testing.
* @todo Refine these to final styles.
*/
/**
* Products block preview mode.
*/
.wc-products-block-preview {
&.grid {
overflow: hidden;
.product-preview {
float: left;
text-align: center;
margin-right: 3.8%;
}
&.cols-1 .product-preview {
float: none;
margin-right: 0;
}
&.cols-2 .product-preview {
width: 48%;
&:nth-of-type(2n) {
margin-right: 0;
}
}
&.cols-3 .product-preview {
width: 30.75%;
&:nth-of-type(3n) {
margin-right: 0;
}
}
&.cols-4 .product-preview {
width: 22.05%;
&:nth-of-type(4n) {
margin-right: 0;
}
}
&.cols-5 .product-preview {
width: 16.9%;
&:nth-of-type(5n) {
margin-right: 0;
}
}
}
&.list {
.product-preview {
overflow: hidden;
}
img {
float: left;
width: 50%;
margin-right: 2em;
margin-bottom: 2em;
}
}
.product-add-to-cart {
background: gray;
border-radius: 10px;
color: white;
cursor: pointer;
padding: .5em 1em;
line-height: 3em;
}
}
/**
* Products block edit mode.
*/
.wc-product-display-settings {
background-color: #f8f9f9;
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
font-size: 13px;
padding: 1em;
min-height: 200px;
position: relative;
> h4 {
text-align: center;
}
.wc-products-display-option {
background-color: #FFFFFF;
padding: 1.5em;
box-sizing: border-box;
border: 1px solid gray; // @todo remove this when doing real styles.
width: 80%;
margin-left: auto;
margin-right: auto;
h4 {
margin: 0;
font-size: 1.25em;
}
p {
margin: 0;
}
/**
* These settings are only shown when the parent group is expanded.
*/
&.value-featured,
&.value-best_sellers,
&.value-best_rated,
&.value-on_sale,
&.value-attribute {
display: none;
}
}
/**
* Show options when the Filter group is expanded.
*/
&.expanded-group-filter {
.wc-products-display-option {
&.value-featured,
&.value-best_sellers,
&.value-best_rated,
&.value-on_sale,
&.value-attribute {
display: block;
}
}
}
.display-settings-container {
&.existing {
right: 0;
position: absolute;
width: 80%;
z-index: 999;
.wc-products-display-option {
margin-right: 0;
}
}
}
.settings-heading {
display: flex;
justify-content: space-between;
}
.display-select {
margin: 0 -1em 20px;
padding-bottom: 20px;
border-bottom: 1px solid #e6eaee;
text-align: center;
select {
margin-left: 1em;
}
}
.product-category-select {
margin: 0 auto;
position: relative;
2018-02-19 19:57:37 +00:00
overflow: hidden;
#product-category-search {
width: 100%;
margin: 0 0 10px;
2018-02-19 19:57:37 +00:00
padding: 10px 15px;
border-radius: 0;
border-color: #E6EAEE;
}
2018-02-19 19:57:37 +00:00
.product-categories-list {
height: 200px;
overflow-y: scroll;
ul {
list-style-type: none;
li {
margin: 0;
2018-02-19 19:57:37 +00:00
label {
display: flex;
align-items: center;
flex-direction: row;
}
input[type="checkbox"] {
margin-top: 0;
margin-right: 8px;
border-radius: 0;
}
ul {
display: none;
padding: 8px 45px 8px 40px;
border-top: 1px solid #E6EAEE;
2018-02-19 19:57:37 +00:00
li {
margin: 5px 0;
}
}
}
2018-02-19 19:57:37 +00:00
}
/* First in list */
> ul {
margin-top: 1px;
padding: 0 0 15px;
> li {
background: #FDFDFD;
border: 1px solid #E6EAEE;
margin-top: -1px;
> label {
padding: 10px 0 10px 15px;
2018-02-19 19:57:37 +00:00
background: #fff;
}
&.product-category-accordion-open {
margin: -1px 0 5px;
2018-02-19 19:57:37 +00:00
border-bottom-width: 1px;
&:not(:first-child) {
margin-top: 5px;
2018-02-19 19:57:37 +00:00
}
ul {
display: block;
}
}
}
}
2018-02-19 19:57:37 +00:00
.product-category-accordion-toggle {
cursor: pointer;
color: #666;
margin: 0;
padding: 0 15px 0 10px;
2018-02-19 19:57:37 +00:00
border: none;
border-radius: 0;
background: none;
outline: none;
text-decoration: none;
}
.product-category-count {
padding: 0 10px;
border: 1px solid #e9e9e9;
border-radius: 15px;
color: #aaa;
font-size: .8em;
margin-left: auto;
}
}
&:after {
content: '';
position: absolute;
bottom: 0;
width: 100%;
height: 1.5em;
background: linear-gradient( rgba( 255, 255, 255, .1 ) 0, #f8f9f9 100% );
}
}
2018-02-16 19:40:19 +00:00
.product-specific-select {
margin: 0 auto;
position: relative;
input[type=text] {
width: 100%;
padding-right: 3em;
}
.cancel {
position: absolute;
top: 0.5em;
right: 1em;
cursor: pointer;
}
button {
display: flex;
justify-content: space-between;
width: 100%;
background-color: #FFFFFF;
border: 1px solid #e6eaee;
text-align: left;
padding: .5em;
img {
padding-top: .5em;
}
a {
line-height: 3em;
margin-right: .5em;
}
.product-name {
line-height: 3em;
width: 300px;
white-space: nowrap;
overflow: hidden;
}
}
ul {
list-style-type: none;
}
li {
margin: 0;
}
.product-search-results {
position: absolute;
width: 100%;
z-index: 999;
}
.selected-products {
margin-top: 1em;
margin-bottom: 1em;
}
}
.block-footer {
margin: 0 -1em;
padding-top: 1em;
border-top: 1px solid #e6eaee;
text-align: center;
2018-02-19 19:57:37 +00:00
.button {
padding-left: 25px;
padding-right: 25px;
}
}
.display-select + .block-footer {
padding-top: 0;
border: 0;
}
}
@media only screen and (min-width: 700px) {
.wc-product-display-settings {
2018-02-16 19:40:19 +00:00
.product-specific-select {
width: 400px;
}
.product-category-select {
width: 400px;
2018-02-19 19:57:37 +00:00
.product-categories-list {
width: 440px;
> ul {
2018-02-19 19:57:37 +00:00
width: 400px;
}
}
}
}
}