Skip to content

Commit

Permalink
MDL-60636 themes: form autocomplete chevron down on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas Brands committed Jul 17, 2019
1 parent f7e1084 commit b101ce5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
5 changes: 4 additions & 1 deletion lib/templates/form_autocomplete_input.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
{ "inputID": 1, "suggestionsId": 2, "selectionId": 3, "downArrowId": 4, "placeholder": "Select something" }
}}
{{#showSuggestions}}
<input type="text" id="{{inputId}}" class="form-control" list="{{suggestionsId}}" placeholder="{{placeholder}}" role="combobox" aria-expanded="false" autocomplete="off" autocorrect="off" autocapitalize="off" aria-autocomplete="list" aria-owns="{{suggestionsId}} {{selectionId}}" {{#tags}}data-tags="1"{{/tags}}/><span class="form-autocomplete-downarrow" id="{{downArrowId}}">&#x25BC;</span>
<div class="d-inline-block position-relative">
<input type="text" id="{{inputId}}" class="form-control" list="{{suggestionsId}}" placeholder="{{placeholder}}" role="combobox" aria-expanded="false" autocomplete="off" autocorrect="off" autocapitalize="off" aria-autocomplete="list" aria-owns="{{suggestionsId}} {{selectionId}}" {{#tags}}data-tags="1"{{/tags}}/>
<span class="form-autocomplete-downarrow position-absolute p-1" id="{{downArrowId}}">&#x25BC;</span>
</div>
{{/showSuggestions}}
{{^showSuggestions}}
<input type="text" id="{{inputId}}" placeholder="{{placeholder}}" role="textbox" aria-owns="{{selectionId}}" {{#tags}}data-tags="1"{{/tags}}/>
Expand Down
6 changes: 2 additions & 4 deletions theme/boost/scss/moodle/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,9 @@ fieldset.coursesearchbox label {

.form-autocomplete-downarrow {
color: $body-color;
position: relative;
top: 0.2em;
left: -1.5em;
top: 0.2rem;
right: 0.5rem;
cursor: pointer;

.loading-icon {
position: absolute;
top: 0;
Expand Down
5 changes: 2 additions & 3 deletions theme/boost/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -14861,9 +14861,8 @@ fieldset.coursesearchbox label {

.form-autocomplete-downarrow {
color: #373a3c;
position: relative;
top: 0.2em;
left: -1.5em;
top: 0.2rem;
right: 0.5rem;
cursor: pointer; }
.form-autocomplete-downarrow .loading-icon {
position: absolute;
Expand Down
5 changes: 2 additions & 3 deletions theme/classic/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -15118,9 +15118,8 @@ fieldset.coursesearchbox label {

.form-autocomplete-downarrow {
color: #373a3c;
position: relative;
top: 0.2em;
left: -1.5em;
top: 0.2rem;
right: 0.5rem;
cursor: pointer; }
.form-autocomplete-downarrow .loading-icon {
position: absolute;
Expand Down

0 comments on commit b101ce5

Please sign in to comment.