mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Tweak checkbox dropdown styles
Use the new design for checkboxes and fix alignment. Removes redesigned-input, which is a small regression on the old design, but I think it's acceptable bcause we're going to shut it down soon.
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
%div.menu{ 'ng-show' => "expanded" }
|
||||
.menu_items
|
||||
.menu_item{ "ng-repeat": "column in columns", "ng-click": "toggle(column);" }
|
||||
%input.redesigned-input{ type: "checkbox", "ng-checked": "column.visible" }
|
||||
{{ column.name }}
|
||||
%input{ type: "checkbox", "ng-checked": "column.visible" }
|
||||
%span
|
||||
{{ column.name }}
|
||||
%hr
|
||||
%div.menu_item.text-center
|
||||
%input.fullwidth.orange{ type: "button", "ng-value": "saved() ? 'Saved': 'Saving'", "ng-show": "saved() || saving", "ng-disabled": "saved()" }
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
%div.menu_items
|
||||
- @options.each do |option|
|
||||
%label.menu_item{ "data-multiple-checked-select-target": "option", "data-value": option[1], "data-label": option[0] }
|
||||
%input.redesigned-input{ type: "checkbox", checked: @selected.include?(option[1]), name: "#{@name}[]", value: option[1] }
|
||||
= option[0]
|
||||
%input{ type: "checkbox", checked: @selected.include?(option[1]), name: "#{@name}[]", value: option[1] }
|
||||
%span= option[0]
|
||||
|
||||
@@ -6,32 +6,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type="checkbox"].redesigned-input {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-o-appearance: none;
|
||||
appearance: none;
|
||||
outline: none;
|
||||
content: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:before {
|
||||
font-family: "FontAwesome";
|
||||
content: "\f00c";
|
||||
font-size: 15px;
|
||||
color: transparent !important;
|
||||
background: transparent !important;
|
||||
display: block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border: 1px solid #809cb1;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
&:checked:before {
|
||||
color: $color-txt-text !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,8 +101,6 @@
|
||||
|
||||
> span {
|
||||
width: auto;
|
||||
text-transform: uppercase;
|
||||
font-size: 85%;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@@ -190,7 +188,6 @@
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
width: auto;
|
||||
text-transform: uppercase;
|
||||
font-size: 85%;
|
||||
font-weight: 600;
|
||||
margin: -8px -15px;
|
||||
@@ -212,6 +209,7 @@
|
||||
border: 1px solid $lighter-grey;
|
||||
background-color: $lighter-grey;
|
||||
padding: 0px;
|
||||
line-height: normal;
|
||||
|
||||
&:hover {
|
||||
border-color: $lighter-grey;
|
||||
@@ -263,8 +261,12 @@
|
||||
cursor: pointer;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 5px;
|
||||
text-transform: uppercase;
|
||||
font-size: 85%;
|
||||
font-size: inherit;
|
||||
|
||||
// Align checkbox and text
|
||||
& > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user