Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]change in Search bar on focus #155

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,22 @@
.flex-column{
flex-direction: column;
}

input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: searchfield-cancel-button;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather not use it as https://developer.mozilla.org/fr/docs/Web/CSS/::-webkit-search-cancel-button and also we have to move the glass, I rather stay with standard web stuf when we can.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok then we can set that cancel button dynamically only, because bootstrap doesn't renders that to be displayed by default. But I guess cancel button is not so useful so, I should leave this.
I looked for many approaches then still bootstrap hasn't fixed it. So should I leave this or create dynamically using JS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this discussion bootstrap hides it purposely.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I wasn't aware of that. So if even Bootstrap says we should not have cancel button, we should not have it.

As a conclusion no css changes, not html changes ? Just close this PR ?

}
input[type="search"] {
width: 26em;
-webkit-transition: width 0.1s ease-in-out;
transition: width 0.1s ease-in-out;
}
input[type="search"]:focus {
width: 60vw;
}
@media screen and (min-width: 1200px) {
input[type="search"]:focus {
width: 50vw;
}
}
.meta-info>*{
font-size:0;
color:white;
Expand Down
10 changes: 4 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,13 @@ <h1 id="pageTitle">EDAM ontology</h1>
<div>
<div class="btn-group" role="group" style="width: 100%;z-index:1">
<input
type="text"
type="search"
tabindex="1"
class="form-control ui-autocomplete-input search-term"
placeholder="Search for concepts here, enter at least two letters"
style="font-family: FontAwesome, Arial;"
class="form-control ui-autocomplete-input search-term"
placeholder="&#xf002; Search for concepts here, enter at least two letters"
onclick="$(this).select();"
>
<span class="input-group-text border-0" id="search-addon" >
<i class="glyphicon glyphicon-search form-control-feedback text-muted" style="font-size: 15px;"></i>
</span>
</div>
</div>
</div>
Expand Down