Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 51472e4

Browse files
author
vvo
committed
fix(style): default input should be 100% wide
That's the only default styling we want to provide.
1 parent a0bd346 commit 51472e4

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

docs/source/bootstrap.html.erb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: bootstrap
3+
---
4+
5+
<h1>Example using bootstrap</h1>
6+
7+
<input type="search" class="form-control" id="test" />
8+
9+
<script>
10+
places({
11+
container: document.querySelector('#test')
12+
});
13+
</script>
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@
55
<meta charset="utf-8">
66
<meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
77

8+
<!-- Latest compiled and minified CSS -->
9+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
10+
11+
<!-- Optional theme -->
12+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
13+
814
<!-- Always force latest IE rendering engine or request Chrome Frame -->
915
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
1016
<title>Algolia Places | No style test</title>
1117
<%= javascript_include_tag config[:places_lib_url] %>
1218
<style>
1319
body {
14-
font-family: Sans
20+
font-family: Sans;
21+
padding: 3em;
1522
}
1623
</style>
1724
</head>

docs/source/nostyle.html.erb

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/places.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
.algolia-places.algolia-places-styled {
1313
width: 100%;
1414

15+
.ap-input, .ap-hint {
16+
width: 100%;
17+
}
18+
1519
.ap-input:hover ~ .ap-input-icon svg,
1620
.ap-input:focus ~ .ap-input-icon svg,
1721
.ap-input-icon:hover svg {

0 commit comments

Comments
 (0)