Skip to content

Instantly share code, notes, and snippets.

@ffflabs
Last active October 12, 2018 11:32
Show Gist options
  • Select an option

  • Save ffflabs/323c188d6502cb6af3783bd1c5990ba2 to your computer and use it in GitHub Desktop.

Select an option

Save ffflabs/323c188d6502cb6af3783bd1c5990ba2 to your computer and use it in GitHub Desktop.
Styling for suggestion container
.add_to_cart_mixin {
padding: 8px 10px 8px 15px;
box-sizing: border-box;
border-radius: 3px;
background-color: #128ced;
color: white !important;
&:before {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
display: inline-block;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1;
font-family: 'Font Awesome 5 Free';
font-weight: 900;
line-height: inherit;
content: "\f07a";
height: 1em;
line-height: 1.618em;
margin-left: -5px;
margin-right: 10px;
}
}
.added_to_cart_mixin {
background-color: #0b538e;
border-radius: 3px;
box-sizing: border-box;
padding: 8px 10px 8px 15px;
&:after {
font-size: 1.8em;
line-height: 1em;
margin-bottom: -0.2em;
margin-left: 0.5407911001em;
margin-top: 0;
vertical-align: -.2em;
}
}
.dgwt-wcas-suggestions-wrapp {
.suggestionParent {
float: left;
clear: left;
border-bottom: 1px solid #dfdfdf;
height: 60px;
position: relative;
width: 440px;
.dgwt-wcas-suggestion {
width: 440px;
float: left;
border-bottom: 0 none;
z-index: 90;
position: absolute;
padding-right: 140px !important;
box-sizing: border-box;
}
.button_actions {
position: absolute;
z-index: 120;
height: 38px;
width: 130px;
text-align: center;
background-color: transparent;
right: 0;
top: 15px;
.added_to_cart.wc-forward {
font-size: 0.9em;
width: 92%;
.added_to_cart_mixin();
}
.ajax_add_to_cart {
font-size: 0.9em;
width: 92%;
.add_to_cart_mixin();
&.added {
display: none;
}
}
}
}
&.noClicks {
.suggestionParent {
.dgwt-wcas-suggestion {
pointer-events: none;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment