mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Changing the class .filter-box for shopfront to .filter-shopfront
This prevents the issue with inheritance / styling crossover
This commit is contained in:
@@ -35,7 +35,7 @@ Darkswarm.directive 'singleLineSelectors', ($timeout, $filter) ->
|
||||
|
||||
fit = ->
|
||||
used = $(element).find("li.more").outerWidth(true)
|
||||
available = $(element).parent(".filter-box").innerWidth()
|
||||
available = $(element).parent(".filter-shopfront").innerWidth()
|
||||
$(element).find("li").not(".more").each (i) ->
|
||||
used += $(this).outerWidth(true)
|
||||
scope.allSelectors[i].fits = used <= available
|
||||
|
||||
@@ -6,14 +6,6 @@
|
||||
%em from
|
||||
%span.avenir {{ enterprise.name }}
|
||||
|
||||
.filter-box.taxon-selectors
|
||||
%div{ objects: "[product] | taxonsOf"}
|
||||
|
||||
%hr
|
||||
|
||||
.filter-box.property-selectors
|
||||
%single-line-selectors{ objects: "[product] | propertiesOf"}
|
||||
|
||||
|
||||
/ %render-svg{path: "{{product.primary_taxon.icon}}"}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
margin: 0 0 0.25rem 0.25rem
|
||||
&:hover, &:focus
|
||||
background: transparent
|
||||
&.active
|
||||
box-shadow: none
|
||||
|
||||
a
|
||||
@include border-radius(0.5em)
|
||||
@@ -69,7 +71,7 @@
|
||||
span.filter-label
|
||||
opacity: 0.75
|
||||
|
||||
.filter-box.taxon-selectors, .filter-box.property-selectors
|
||||
.filter-shopfront.taxon-selectors, .filter-shopfront.property-selectors
|
||||
background: transparent
|
||||
|
||||
single-line-selectors
|
||||
@@ -86,7 +88,7 @@
|
||||
list-style: none
|
||||
|
||||
|
||||
.filter-box
|
||||
.filter-shopfront
|
||||
// Shopfront taxons
|
||||
&.taxon-selectors
|
||||
@include filter-selector($clr-blue, $clr-blue-light, $clr-blue-bright)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
margin-left: 0
|
||||
margin-right: 0
|
||||
|
||||
.row.filter-box:first-child, .row.filter-box.filter-box-shopfront
|
||||
.row.filter-box:first-child
|
||||
border: 1px solid $clr-blue-light
|
||||
@include border-radius(0.25em)
|
||||
margin-top: 2px
|
||||
@@ -19,11 +19,6 @@
|
||||
background: transparent
|
||||
margin-top: 1em
|
||||
|
||||
.row.filter-box.filter-box-shopfront
|
||||
margin-top: 0
|
||||
background: transparent
|
||||
border: 0 none
|
||||
|
||||
products .filter-box
|
||||
background: #f7f7f7
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.filter-box.taxon-selectors.animate-hide.text-right
|
||||
.filter-shopfront.taxon-selectors.animate-hide.text-right
|
||||
%single-line-selectors{ objects: "Products.products | products:query | taxonsOf", "active-selectors" => "activeTaxons"}
|
||||
|
||||
.filter-box.property-selectors.animate-hide.text-right
|
||||
.filter-shopfront.property-selectors.animate-hide.text-right
|
||||
%single-line-selectors{ objects: "Products.products | products:query | propertiesOf", "active-selectors" => "activeProperties"}
|
||||
|
||||
Reference in New Issue
Block a user