Skip to content

Instantly share code, notes, and snippets.

@amenk
Created September 28, 2018 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amenk/46ef565bb0e9c4e4df934b4809b90f2f to your computer and use it in GitHub Desktop.
Save amenk/46ef565bb0e9c4e4df934b4809b90f2f to your computer and use it in GitHub Desktop.
Smile SA ElasticSearch to SASS
// /**
// * DISCLAIMER
// *
// * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
// * versions in the future.
// *
// *
// * $category Smile
// * $package Smile\ElasticsuiteCatalog
// * $author Aurelien FOUCRET <aurelien.foucret$smile@mixin fr>
// * $copyright 2018 Smile
// * $license Open Software License ("OSL") v. 3@mixin 0
// */
// autoconverted from vendor/smile/elasticsuite/src/module-elasticsuite-core/view/frontend/web/css/source
.smile-es-range-slider {
[data-role=from-label] {
display: block;
float: left;
padding: 0 0 5px;
}
[data-role=to-label] {
display: block;
float: right;
padding: 0 0 5px;
}
[data-role=message-box] {
font-size: 90%;
flex: 1;
padding: 6px 0 0;
&.empty {
@include lib-form-validation-note();
padding: 0;
}
}
.actions-toolbar {
display: flex;
margin: 15px 0;
}
.ui-slider {
margin: 5px;
clear: both;
}
.ui-slider-handle {
padding: 0;
margin: -3px 0 0 -7px;
-webkit-border-radius: 15px;
width: 15px;
height: 15px;
background: $active__color;
}
}
.filter {
.filter-content .item {
margin: 10px 0 0 10px;
}
.block-subtitle {
border-bottom: none;
font-weight: bold;
}
.field.search {
input[type="text"] {
font-size: 85%;
}
}
.actions {
text-align: right;
margin: 10px 0 0;
div.secondary {
display: inline-block;
a {
text-decoration: underline;
cursor: pointer;
color: $link__color;
&:hover {
background: transparent;
}
&.show-more {
span:after {
content: " +";
}
}
&.show-less {
span:after {
content: " \2212";
}
}
}
}
}
.filter-options {
dt.filter-options-title[aria-expanded="true"]:after {
content: "\e621"
}
}
.no-results-message p {
margin: 9px 10px 0;
background-color: #FFEEEE;
padding: 5px;
color: #AA0000;
}
}
.smile-elasticsuite-autocomplete-result {
.product-image-box {
float: left;
padding: 0 5px;
width: 55px;
}
.product-shop {
float: left;
margin: 0 10px 0 0;
padding: 0;
white-space: normal;
width: 60%;
}
.product-item {
.price-box {
margin: 5px 0;
}
}
.category-mini-crumb {
font-style: italic;
display: block;
margin-bottom: 0.2em;
font-size: 85%;
color: #929292;
}
.product-attribute-label {
text-transform: uppercase;
vertical-align: super;
font-size: 63%;
color: #777;
}
.price-box {
span.old-price {
display:block;
}
}
}
@include min-screen($screen__m) {
.page-layout-1column {
.filter-options {
.filter {
&-options {
&-content {
padding: $indent__s;
}
}
}
}
}
}
// /**
// * DISCLAIMER
// *
// * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
// * versions in the future.
// *
// *
// * $category Smile
// * $package Smile\ElasticsuiteCore
// * $author Romain Ruaud <romain.ruaud$smile@mixin fr>
// * $copyright 2018 Smile
// * $license Open Software License ("OSL") v. 3@mixin 0
// */
// autoconverted from vendor/smile/elasticsuite/src/module-elasticsuite-core/view/frontend/web/css/source
// + manually adapted to snowdog blank theme
.search-autocomplete {
position: absolute;
z-index: 3;
overflow: hidden;
margin-top: -15px;
@extend .abs-add-box-sizing;
dl {
@include lib-list-reset-styles();
dt {
&:not(:empty) {
background: $autocomplete__background-color;
border: $autocomplete__border;
border-top: 0;
border-bottom: 0;
}
border-top: $autocomplete-item__border;
cursor: default;
margin: 0;
padding: $indent__xs $indent__xl $indent__xs $indent__s;
position: relative;
text-align: left;
white-space: normal;
&:first-child {
border-top: none;
}
&:hover,
&.selected {
background: $autocomplete-item__hover__color;
}
}
dd {
&:not(:empty) {
background: $autocomplete__background-color;
border: $autocomplete__border;
border-top: 0;
}
border-top: $autocomplete-item__border;
cursor: pointer;
margin: 0;
padding: $indent__xs $indent__s;
position: relative;
text-align: left;
white-space: normal;
&:first-child {
border-top: none;
}
&:hover,
&.selected {
background: $autocomplete-item__hover__color;
}
.amount {
color: $autocomplete-item-amount__color;
position: absolute;
right: 7px;
top: $indent__xs;
}
.clear {
clear:both;
}
}
}
}
// /**
// * DISCLAIMER
// *
// * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
// * versions in the future.
// *
// *
// * $category Smile
// * $package Smile\ElasticsuiteCatalog
// * $author Aurelien FOUCRET <aurelien.foucret$smile@mixin fr>
// * $copyright 2018 Smile
// * $license Open Software License ("OSL") v. 3@mixin 0
// */
// autoconverted from vendor/smile/elasticsuite/src/module-elasticsuite-core/view/frontend/web/css/source
.smile-es-range-slider {
[data-role=from-label] {
display: block;
float: left;
padding: 0 0 5px;
}
[data-role=to-label] {
display: block;
float: right;
padding: 0 0 5px;
}
[data-role=message-box] {
font-size: 90%;
flex: 1;
padding: 6px 0 0;
&.empty {
@include lib-form-validation-note();
padding: 0;
}
}
.actions-toolbar {
display: flex;
margin: 15px 0;
}
.ui-slider {
margin: 5px;
clear: both;
}
.ui-slider-handle {
padding: 0;
margin: -3px 0 0 -7px;
-webkit-border-radius: 15px;
width: 15px;
height: 15px;
background: $active__color;
}
}
.filter {
.filter-content .item {
margin: 10px 0 0 10px;
}
.block-subtitle {
border-bottom: none;
font-weight: bold;
}
.field.search {
input[type="text"] {
font-size: 85%;
}
}
.actions {
text-align: right;
margin: 10px 0 0;
div.secondary {
display: inline-block;
a {
text-decoration: underline;
cursor: pointer;
color: $link__color;
&:hover {
background: transparent;
}
&.show-more {
span:after {
content: " +";
}
}
&.show-less {
span:after {
content: " \2212";
}
}
}
}
}
.filter-options {
dt.filter-options-title[aria-expanded="true"]:after {
content: "\e621"
}
}
.no-results-message p {
margin: 9px 10px 0;
background-color: #FFEEEE;
padding: 5px;
color: #AA0000;
}
}
.smile-elasticsuite-autocomplete-result {
.product-image-box {
float: left;
padding: 0 5px;
width: 55px;
}
.product-shop {
float: left;
margin: 0 10px 0 0;
padding: 0;
white-space: normal;
width: 60%;
}
.product-item {
.price-box {
margin: 5px 0;
}
}
.category-mini-crumb {
font-style: italic;
display: block;
margin-bottom: 0.2em;
font-size: 85%;
color: #929292;
}
.product-attribute-label {
text-transform: uppercase;
vertical-align: super;
font-size: 63%;
color: #777;
}
.price-box {
span.old-price {
display:block;
}
}
}
@include min-screen($screen__m) {
.page-layout-1column {
.filter-options {
.filter {
&-options {
&-content {
padding: $indent__s;
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment