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:
David Cook
2024-06-05 15:19:58 +10:00
parent ae66a85cc5
commit e516e7f335
4 changed files with 12 additions and 38 deletions

View File

@@ -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()" }

View File

@@ -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]

View File

@@ -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;
}
}

View File

@@ -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;
}
}
}
}