Kendo legacy theme's problems - css

This is a self-answered question
I'd like to use Kendo legacy themes for my app, since default themes are extremely ugly. I chose Office 2007 theme. I've included the following files:
<link href="~/Content/kendo/legacy/telerik.common.css" rel="stylesheet" />
<link href="~/Content/kendo/legacy/telerik.office2007.min.css" rel="stylesheet" />
I came across several problems with this themes that I'm not able to get ride of them and any help is appreciated.
Aligning buttons. Custom buttons are higher in the grid than the Grid's buttons.
Paging. Current page's number is shown in the corner. Also pagination's buttons are reverse, and page number's box is too big.
Multi select's wheel doesn't stop, even after loading items!
And finally, window's minimize button isn't visible.
This is the CSS I have used for buttons:
.k-grid .k-button{
width: 10px;
min-width: 10px !important;
}
.k-grid-custom,
.k-grid-custom:hover{
background-image: url('/Content/Images/Icon/icon.png');
height: 20px;
background-position: center;
background-repeat: no-repeat;
}
.k-edit{
background-image: url('/Content/Images/Icon/Edit.png');
background-position: 0 0 ;
}

Well, I worked around the multiselect's problem with robbing some of CSS from kendo.common.css.
.k-multiselect-wrap {
position: relative;
border-width: 0;
border-style: solid;
border-radius: 4px;
border-color: #c5c5c5;
background-color: #FFF;
min-height: 2.04em;
}
.k-multiselect-wrap .k-input {
background-color: transparent;
height: 1.31em;
line-height: 1.31em;
padding: .18em 0;
text-indent: .33em;
border: 0;
margin: 1px 0 0;
float: left;
}
.k-multiselect-wrap li {
margin: 1px 0 1px 1px;
padding: .1em 1.6em .1em .4em;
line-height: 1.5em;
float: left;
position: relative;
}
.k-autocomplete .k-loading, .k-multiselect .k-loading {
position: absolute;
right: 3px;
bottom: 4px;
}
.k-multiselect .k-loading-hidden {
visibility: hidden;
}
.k-multiselect-wrap .k-select {
position: absolute;
top: 0;
bottom: 0;
right: 0;
padding: .1em .2em;
}
You can hide current page's number:
.k-pager-numbers .k-current-page {
display: none;
}
Page numbers' size:
.k-pager-wrap .k-dropdown {
width: 4.500em;
}
For pagination's arrows, if you're using left-to-right you won't have any problem. In case you're using right-to-left, k-rtl, replace following CSS in telerik.common.css, line #230:
.k-i-seek-w { background-position: -48px -192px; }
.k-i-arrow-w { background-position: -32px -192px; }
.k-i-arrow-e { background-position: -16px -192px; }
.k-i-seek-e { background-position: 0 -192px; }
.k-state-disabled .k-i-seek-w { background-position: -48px -208px; }
.k-state-disabled .k-i-arrow-w { background-position: -32px -208px; }
.k-state-disabled .k-i-arrow-e { background-position: -16px -208px; }
.k-state-disabled .k-i-seek-e { background-position: 0 -208px; }
.k-state-hover .k-i-seek-w { background-position: -48px -224px; }
.k-state-hover .k-i-arrow-w { background-position: -32px -224px; }
.k-state-hover .k-i-arrow-e { background-position: -16px -224px; }
.k-state-hover .k-i-seek-e { background-position: 0 -224px; }
For the minimize button in Kendo Window, it seems they forgot to add the CSS!
.k-i-minimize {background-position: -32px -368px; }
Use the following CSS to align custom buttons with grid's buttons.
.k-grid .k-button {
vertical-align: bottom;
}

Related

How to move text in a input field?

So I'm in the process of learning and trying to make my own website. I have most of the form how I would like it but, I'm not sure how to clear the placeholder text away from the svg img so it will be legible. Some help would be greatly appreciated.
Thanks in advance.
Screen Capture of my problem. Also if you would tell me if it looks okay that would be great also!
.inputTagz{
padding-left: 25px;
cursor: text;
font-size: 14px;
float: left;
width: 100%;
font-size: px;
padding-top: 11px;
padding-bottom: 11px;
margin-top:20px;
font-weight:700;
}
#name{
background-image: url("man.svg");
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#emailPhone{
background-image: url("mail.svg");
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#password{
background-image: url("lock.svg");
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#formDiv{
width: 450px;
float: left;
left: 50%;
}
you need to edit your place holder, you can use this
#emastrong textilPhone {
background-image: url("mail.svg");
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#password {
background-image: url("lock.svg");
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#emailPhone::-webkit-input-placeholder {
padding-left: 25px;
}
#emailPhone::-moz-placeholder {
padding-left: 25px;
}
#emailPhone:-moz-placeholder { /* Older versions of Firefox */
padding-left: 25px;
}
#emailPhone:-ms-input-placeholder {
padding-left: 25px;
}
#password::-webkit-input-placeholder {
padding-left: 25px;
}
#password::-moz-placeholder {
padding-left: 25px;
}
#password:-moz-placeholder { /* Older versions of Firefox */
padding-left: 25px;
}
#password:-ms-input-placeholder {
padding-left: 25px;
}
please check the latest update about how to edit the placeholder. Thank you, I hope it will help you.
try this code...
try this
CSS
input[type=text] {
padding-left: 25px; //change it base on your desired output
}
see my sample fiddle
Hey guys thanks for answering my question I greatly appreciate it. The style I was looking for was the input-placeholder CSS3 tag.
I just added these sets of tags to my page. Hopefully I can help someone like me.
input::-webkit-input-placeholder {
padding-left:20px;
}
input::-moz-placeholder {
padding-left:20px;
}
input:-moz-placeholder { /* Older versions of Firefox */
padding-left:20px;
}
input:-ms-input-placeholder {
padding-left:20px;
}
Please add this css
input[type='text'] {
padding-left: 25px;
max-width : calc(100% - 25px);
}
From what I can understand, you just need to remove the 'placeholder'attribute from the code for all three inputs in the form you created.
For your reference click here
You can wrap it inside a parent div with separate img and input tag as follows:
<div id="some_id">
<img src="http://images.brighthub.com/a3/d/a3d2a3f5888d96ddde78d526bf9448dddf2fb4aa_small.jpg">
<input type="text" placeholder="Enter Your Name" id="some_text_id">
</div>
EXAMPLE FIDDLE

Reusing nested classes in LESS for sprite icon reuse

I have a .less file that contains classes to manage my sprites, such as:
.icon-16 {
background: url('/Content/images/app/icons-16.png') no-repeat top left;
width: 16px;
height: 16px;
&.about { background-position: 0px 0px; }
&.add { background-position: 0px -16px; }
&.add2 { background-position: 0px -32px; }
}
Later on in another .less file that is being linked, I need to set background images using these sprites.
I know it is possible to reuse a class like this:
.myClass {
.mySharedClass;
}
However I'm unable to work out the correct syntax to reuse a class in a nested hierarchy.
What I would like to do is something like the following:
.myClass {
.icon-16.about;
}
Giving the following output (from both .icon-16 and .about):
.myClass {
background: url('/Content/images/app/icons-16.png') no-repeat top left;
width: 16px;
height: 16px;
background-position: 0px 0px;
}
However this doesn't compile.
How can I achieve this nested class reuse?
If what I'm trying to do is not possible, what would be the best alternative to allow my
sprites to be used in other classes?
Specific Solution in This Case
I recommend making a master mixin to generate what you need, as you need it. Here is a solution that works with your current version of LESS 1.3.1:
LESS
.make-icon-16(#form: all) {
background: url('/Content/images/app/icons-16.png') no-repeat top left;
width: 16px;
height: 16px;
#about: 0px 0px;
#add: 0px -16px;
#add2: 0px -32px;
.makePositioning() when (#form = all) {
&.about { background-position: #about; }
&.add { background-position: #add; }
&.add2 { background-position: #add2; }
}
.makePositioning() when (#form = about) {
background-position: #about;
}
.makePositioning() when (#form = add) {
background-position: #add;
}
.makePositioning() when (#form = add2) {
background-position: #about;
}
.makePositioning();
}
//to generate icon classes
.icon-16 {
.make-icon-16;
}
//to include as you want in your class
.myClass {
.make-icon-16(about);
}
CSS Output
.icon-16 {
background: url('/Content/images/app/icons-16.png') no-repeat top left;
width: 16px;
height: 16px;
}
.icon-16.about {
background-position: 0px 0px;
}
.icon-16.add {
background-position: 0px -16px;
}
.icon-16.add2 {
background-position: 0px -32px;
}
.myClass {
background: url('/Content/images/app/icons-16.png') no-repeat top left;
width: 16px;
height: 16px;
background-position: 0px 0px;
}
If you don't need or want the actual .icon-16 classes, skip the step that makes those as it is not necessary for you to do that.
More General Solution?
If your icons have the right logic to them, then this can be more generalized to accommodate any size icon.
LESS
.make-icon(#form: all, #size: 16) {
background: url('/Content/images/app/icons-#{size}.png') no-repeat top left;
width: #size*1px;
height: #size*1px;
#about: 0px 0px;
#add: 0px (#size*-1px);
#add2: 0px (#size*-2px);
.makePositioning() when (#form = all) {
&.about { background-position: #about; }
&.add { background-position: #add; }
&.add2 { background-position: #add2; }
}
.makePositioning() when (#form = about) {
background-position: #about;
}
.makePositioning() when (#form = add) {
background-position: #add;
}
.makePositioning() when (#form = add2) {
background-position: #about;
}
.makePositioning();
}
//to generate icon classes for 32px size
.icon-32 {
.make-icon(all, 32);
}
CSS Output
.icon-32 {
background: url('/Content/images/app/icons-32.png') no-repeat top left;
width: 32px;
height: 32px;
}
.icon-32.about {
background-position: 0px 0px;
}
.icon-32.add {
background-position: 0px -32px;
}
.icon-32.add2 {
background-position: 0px -64px;
}

Horizontal Line in Background using Css3

How to implement this type of style to text using only css3, means a horizontal line in the middle of the tag... Can it be possible using pure css...
Here's my structure:-
<p class="datedAside">4 weeks ago</p>
You can achieve this with pure css using linear gradient as background:
<p class="datedAside">4 weeks ago</p>
<style>
p {
background: linear-gradient(180deg,
rgba(0,0,0,0) calc(50% - 1px),
rgba(192,192,192,1) calc(50%),
rgba(0,0,0,0) calc(50% + 1px)
);
}
</style>
https://jsfiddle.net/klesun/aujrkpLk/
Here's one way to do it by adding a span inside the p.
HTML:
<p class="datedAside"> <span> 4 weeks ago </span> </p>​
CSS:
p {background: #000; height:1px; margin-top:10px;}
p span{background: #fff; padding:10px; position:relative; top:-10px; left: 20px}​
DEMO: http://jsfiddle.net/9GMJz/
One of the simplest way I know, you can achieve this like this:
HTML
<p>Your text goes here</p>
<hr>
​
CSS
p {
background: #fff; // or whatever is your bg-color
display:inline-block;
padding-right: 1em;
line-height: 1.2em;
}
p+hr {
margin-top: -0.6em;
}
JSFiddle
http://jsfiddle.net/cTMXa/1/
You can do it with a 1% gradient like this
.datedAside {
background: linear-gradient(0deg, transparent 49%, #000 50%, transparent 51%);
}
.datedAside span{
background: #FFF;
padding: 0 0.5rem;
}
You'll nedd the extra span to be the same background color as the background of the component to make it look like it has "deleted" the line going behind the text.
You could add a pseudo-element to the paragraph selector like so:
p {
::before {
border-top: 10px solid #0066a4;
content:"";
margin: 0 auto; /* this centers the line to the full width specified */
position: absolute; /* positioning must be absolute here, and relative positioning must be applied to the parent */
top: 12px; left: 0; right: 0; bottom: 0;
z-index: -1;
}
}
See this CodePen by Eric Rasch for a working example: https://codepen.io/ericrasch/pen/Irlpm
An alternative with flex and ::before and ::after.
With this solution, you don't need to use a background for the content.
With this HTML markup :
<p class="datedAside"><span>4 weeks ago</span></p>
And this CSS :
.datedAside {
display: flex;
flex-flow: nowrap;
justify-content: space-between;
align-items: center;
}
.datedAside span {
padding: 1em;
}
.datedAside::before,
.datedAside::after {
flex-grow: 1;
flex-shrink: 1;
flex-basis: auto;
content: " ";
height: 0px;
border-bottom: 1px solid black;
}
Artur's solution creates a line however if you increase the px value it becomes clear that the line is still a gradient. This can be fixed by using a start and stop for the middle colour as such:
p {
background: linear-gradient(to bottom, white calc(50% - 1px), black calc(50% - 1px) calc(50% + 1px), white calc(50% + 1px));
}
The line will be double the thickness of the px value given (due to +px -px) so the above gives a horizontal 2px line across the center of the element.
Another way would be to use the linear-gradient as a background and place it in the middle of the paragraph or div.
p {
background-image: linear-gradient(red, red);
background-size: 100% 1px; /* add your height of the line here*/
background-repeat: no-repeat;
background-position: 50% 50%; /*place it in the middle */
}
I was update from fork for my solution.
http://jsfiddle.net/0f9catjy/
Html Block
<h1 class="lined"><span>H1 Lined Sample</span></h2>
<h2 class="lined"><span>H2 Lined Sample</span></h2>
<h3 class="lined"><span>H3 Lined Sample</span></h2>
<h1 class="lined lined-double"><span>H1 Double-lined Sample</span></h1>
<h2 class="lined lined-double"><span>H1 Double-lined Sample</span></h2>
Css Block
/**
* Horizontal Type Line Behind Text
* Inspired by this discussion # CSS-Tricks: http://css-tricks.com/forums/discussion/comment/51357#Comment_51357
* Available on jsFiddle: http://jsfiddle.net/ericrasch/jAXXA/
* Available on Dabblet: http://dabblet.com/gist/2045198
* Available on GitHub Gist: https://gist.github.com/2045198
*/
h1, .h1 { font-size: 2.5rem; }
h2, .h2 { font-size: 2rem; }
h3, .h3 { font-size: 1.75rem; }
h4, .h4 { font-size: 2.5rem; }
h5, .h5 { font-size: 1.25rem; }
h6, .h6 { font-size: 1rem; }
h1.lined, h2.lined, h3.lined, h4.lined, h5.lined, h6.lined
{
font-family: sans-serif;
position: relative;
text-align: left;
z-index: 1;
}
h1.lined:before,
h2.lined:before,
h3.lined:before,
h4.lined:before,
h5.lined:before,
h6.lined:before
{
border-top: 2px solid #dfdfdf;
content: "";
margin: 0 auto;
position: absolute;
top: calc(50% - 2px);
left: 0;
right: 0;
bottom: 0;
width: 95%;
z-index: -1;
}
h1.lined span,
h2.lined span,
h3.lined span,
h4.lined span,
h5.lined span,
h6.lined span
{
background: #fff;
padding: 0 15px;
}
h1.lined-double:before,
h2.lined-double:before,
h3.lined-double:before,
h4.lined-double:before,
h5.lined-double:before,
h6.lined-double:before
{
border-top: none;
}
h1.lined-double:after,
h2.lined-double:after,
h3.lined-double:after,
h4.lined-double:after,
h5.lined-double:after,
h6.lined-double:after
{
border-bottom: 1px solid blue;
-webkit-box-shadow: 0 3px 0 0 red;
-moz-box-shadow: 0 3px 0 0 red;
box-shadow: 0 3px 0 0 red;
content: "";
margin: 0 auto;
position: absolute;
top: calc(50% - 6px);
left: 0;
right: 0;
width: 95%;
z-index: -1;
transform: translateY(calc(-50% + 3px));
}
/** END
* Horizontal Type Line Behind Text
*/

Vertical alignment of Images inside DIV

I am retrieving a bulk images through response and I need to arrange them inside a div tag and all the images are placing one below the other but I need to arrange them vertical (i.e. side by side)
So how do I do that?
And I followed this tutorial but I can arrange only text?
http://phrogz.net/CSS/vertical-align/index.html
Can anyone suggest me the right way?
Here is my code:
$('#showfilelist').append("<div id=" + file.id + "><a href='uploads/" +
file.target_name + "' target='_blank' rel='gallery'><img src='thumbs/" +
file.target_name + "' border='0'/></a> </div>");
Here is what I'm getting the result
Plupload Css:
/*
Plupload
------------------------------------------------------------------- */
.plupload_button {cursor: pointer;}
.plupload_wrapper {
font: normal 11px Verdana,sans-serif;
width: 100%;
}
.plupload .plupload_container input {width: 98%;}
.plupload .plupload_filelist_footer {border-width: 1px 0 0 0}
.plupload .plupload_filelist_header {border-width: 0 0 1px 0}
div.plupload .plupload_file {border-width: 0 0 1px 0}
div.plupload div.plupload_header {border-width: 0 0 1px 0; position: relative;}
.plupload_file .ui-icon {
cursor:pointer;
}
.plupload_header_content {
background-image: url('../img/plupload.png');
background-repeat: no-repeat;
background-position: 8px center;
min-height: 56px;
padding-left: 60px;
position:relative;
}
.plupload_header_content_bw {background-image: url('../img/plupload-bw.png');}
.plupload_header_title {
font: normal 18px sans-serif;
padding: 6px 0 3px;
}
.plupload_header_text {font: normal 12px sans-serif;}
.plupload_filelist,
.plupload_filelist_content {
border-collapse: collapse;
margin: 0;
padding: 0;
width: 100%;
-moz-user-select:none;
-webkit-user-select:none;
user-select:none;
}
.plupload_cell {padding: 8px 6px;}
.plupload_file {
border-left: none;
border-right: none;
}
.plupload .ui-sortable-helper,
.plupload .ui-sortable .plupload_file {
cursor:move;
}
.plupload_scroll {
max-height: 180px;
min-height: 168px;
_height: 168px;
overflow-y: auto;
}
.plupload_file_size, .plupload_file_status {text-align: right;}
.plupload_file_size, .plupload_file_status {width: 52px;}
.plupload_file_action {width: 16px;}
.plupload_file_name {
overflow: hidden;
padding-left: 10px;
}
.plupload_file_rename {
width:95%;
}
.plupload_progress {width: 60px;}
.plupload_progress_container {padding: 1px;}
/* Floats */
.plupload_right {float: right;}
.plupload_left {float: left;}
.plupload_clear,.plupload_clearer {clear: both;}
.plupload_clearer, .plupload_progress_bar {
display: block;
font-size: 0;
line-height: 0;
}
.plupload_clearer {height: 0;}
/* Misc */
.plupload_hidden {display: none;}
.plupload_droptext {
background: transparent;
text-align: center;
vertical-align: middle;
border: 0;
line-height: 165px;
}
.plupload_buttons, .plupload_upload_status {float: left}
.plupload_message {
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
}
.plupload_message p {
padding:0.7em;
margin:0;
}
.plupload_message strong {
font-weight: bold;
}
plupload_message i {
font-style: italic;
}
.plupload_message p span.ui-icon {
float: left;
margin-right: 0.3em;
}
.plupload_header_content .ui-state-error,
.plupload_header_content .ui-state-highlight {
border:none;
}
.plupload_message_close {
position:absolute;
top:5px;
right:5px;
cursor:pointer;
}
.plupload .ui-sortable-placeholder {
height:35px;
}
I believe what you want is float: left; on your images.
Functioning example: http://jsfiddle.net/NeMDZ/2/ (Try moving the middle divider. Flexible layout is optional.)
The basic CSS:
div.imgContain {
overflow:hidden; /* Only necessary if you need to style the containing box.
Forces box to expand to content's height. */
}
div.imgContain img {
float:left;
}
All the other CSS is optional. Style at will.
img {
display: inline-box;
}
The images will set in the same line as long they fit there. Be very careful with padding and margin values.
Images are block-level elements by default, so you will need float: left on your images (or whatever element your image is contained in) if you want them to be side-by-side. If you want to start a new line, create a spacer element like:
.spacer {
clear: both;
}
and then add <div class="spacer"></div> where you want to break a line of images and start a new one. You may need other attributes on your spacer to work in old browsers.

How do you style the dropdown on Google Places Autocomplete API?

We need to tweak the styling of the dropdown that shows the autocomplete place suggestions when using the Google Places/Maps Autocomplete API.
Does anyone know if this is even possible? If so, I guess we just need to know the CSS classnames/IDs.
There's a screen grab of the bit I am referring to here:
This is now documented by google: https://developers.google.com/maps/documentation/javascript/places-autocomplete#style_autocomplete
If you use firebug (as mentioned in a comment to your question...) you see that the container with the autocomplete results is a DIV with the class "pac-container" and the suggestions are inside it as a DIV with the class "pac-item". so just style with CSS.
This CSS will allow the drop-down to resize to fit the width of the results:
.pac-container, .pac-item {
width: inherit !important;
}
It is pretty difficult to inspect the elements since it closes as soon as it loses focus.
Though we know that the container has the .pac-container class and items have .pac-item, upon further investigating the API I found that it embeds the CSS styles in the document.
Here's what initially there, so use it to change the pre-defined styles to fit your needs.
.pac-container {
background-color: #fff;
position: absolute!important;
z-index: 1000;
border-radius: 2px;
border-top: 1px solid #d9d9d9;
font-family: Arial, sans-serif;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden
}
.pac-logo:after {
content: "";
padding: 1px 1px 1px 0;
height: 16px;
text-align: right;
display: block;
background-image: url(https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3.png);
background-position: right;
background-repeat: no-repeat;
background-size: 120px 14px
}
.hdpi.pac-logo:after {
background-image: url(https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3_hdpi.png)
}
.pac-item {
cursor: default;
padding: 0 4px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
line-height: 30px;
text-align: left;
border-top: 1px solid #e6e6e6;
font-size: 11px;
color: #999
}
.pac-item:hover {
background-color: #fafafa
}
.pac-item-selected,
.pac-item-selected:hover {
background-color: #ebf2fe
}
.pac-matched {
font-weight: 700
}
.pac-item-query {
font-size: 13px;
padding-right: 3px;
color: #000
}
.pac-icon {
width: 15px;
height: 20px;
margin-right: 7px;
margin-top: 6px;
display: inline-block;
vertical-align: top;
background-image: url(https://maps.gstatic.com/mapfiles/api-3/images/autocomplete-icons.png);
background-size: 34px
}
.hdpi .pac-icon {
background-image: url(https://maps.gstatic.com/mapfiles/api-3/images/autocomplete-icons_hdpi.png)
}
.pac-icon-search {
background-position: -1px -1px
}
.pac-item-selected .pac-icon-search {
background-position: -18px -1px
}
.pac-icon-marker {
background-position: -1px -161px
}
.pac-item-selected .pac-icon-marker {
background-position: -18px -161px
}
.pac-placeholder {
color: gray
}
I case anyone is interested in the hierarchy I was able to scrape the following using Firebug:
<div class="pac-container pac-logo" style="width: 557px; position: absolute; left: 66px; top: 106px; display: none;">
<div class="pac-item">
<span class="pac-icon pac-icon-marker"></span>
<span class="pac-item-query">
<span>France</span>
</span>
</div>
<div>
This worked for me, and now I can run this on mobile!
.pac-container {
z-index: 10000 !important;
width: auto !important;
position: initial !important;
left: 0 !important;
right: 0 !important;
display: block !important;
}
.pac-container:empty{
display: none !important;
}
And this somewhere!
$('selector').append('.pac-container');
Now the results will show in the selected div as a normal block element :)
To force the box to stay open for much easier styling and inspection from dev tools you can set the input value from the JS console and the container will stay open when inspecting from the dev tools.
Simply run document.querySelector('.pac-target-input').value = 'CB' in the console on your page with the input, then go back to the Elements tab and you can now individually inspect each element.
This gets around the issue where it always closes when focus is lost.
if you want to create your custom html & css then AutocompleteService class is also available which will provide all data in json.
const service = new google.maps.places.AutocompleteService();
service.getQueryPredictions(
{ input: "provide location string here for search" },
(suggestions) => console.log(suggestions)
);
For easier debugging and styling. to keep the dropdown open.
use the following code in chrome console.
document.querySelector('.pac-container').style.display = 'block'
Also used following classes to style the suggested dropdown in google places auto complete
Update icons
.pac-icon {
background-image: url('./assets/locationMark.svg') !important;
background-repeat: no-repeat;
background-position: 0 0;
background-size: 14px 18px;
}
Update text
.pac-item-query {
font-size: 16px
}
Hide google logo
.pac-logo {
padding: 10px 0;
&::after {
display: none;
}
}

Resources