polymer-1.0

Collapsible div inside a CSS grid container expands full width

自古美人都是妖i 提交于 2020-05-17 10:09:36
问题 I have a group of expandable divs inside a CSS grid container. I am using Polymer framework and its iron-collapse component. Codepen - https://codepen.io/vijayvmenon/pen/ZEYKZMX CSS: .card { display: grid; grid-template-columns: repeat(auto-fill,minmax(400px,1fr)); grid-column-gap: 30px; } .container { display:flex; flex-direction:column; border:1px solid black; } The CSS should be pretty straightforward. When I click on any div, the other divs in the row also expand. How can I fix this by

Collapsible div inside a CSS grid container expands full width

随声附和 提交于 2020-05-17 10:09:12
问题 I have a group of expandable divs inside a CSS grid container. I am using Polymer framework and its iron-collapse component. Codepen - https://codepen.io/vijayvmenon/pen/ZEYKZMX CSS: .card { display: grid; grid-template-columns: repeat(auto-fill,minmax(400px,1fr)); grid-column-gap: 30px; } .container { display:flex; flex-direction:column; border:1px solid black; } The CSS should be pretty straightforward. When I click on any div, the other divs in the row also expand. How can I fix this by

Collapsible div inside a CSS grid container expands full width

两盒软妹~` 提交于 2020-05-17 10:08:38
问题 I have a group of expandable divs inside a CSS grid container. I am using Polymer framework and its iron-collapse component. Codepen - https://codepen.io/vijayvmenon/pen/ZEYKZMX CSS: .card { display: grid; grid-template-columns: repeat(auto-fill,minmax(400px,1fr)); grid-column-gap: 30px; } .container { display:flex; flex-direction:column; border:1px solid black; } The CSS should be pretty straightforward. When I click on any div, the other divs in the row also expand. How can I fix this by

Polymer 1.x + Firebase 2.x: How to push or put data to Firebase using Polymerfire?

会有一股神秘感。 提交于 2020-02-24 11:33:04
问题 Using Polymerfire, I want to add new nodes to a Firebase without overwriting data. (I call this push or put behavior.) In other words. I want to start with this: State A my-app | - emails | + email1@example,com + email2@example,com And finish with this. State B my-app | - emails | + email1@example,com + email2@example,com + email3@example,com + email4@example,com But when I start with State A and do this: <firebase-document id="doc" app-name="app" data="{{data}}"> </firebase-document> ...

Light DOM styles “leaking” into Polymer component's shadow DOM

妖精的绣舞 提交于 2020-01-30 12:17:04
问题 I have a polymer web component which has a div named content, within the component. I have noticed that if the host page has a style for div.content then it applies that style to my component! This is an unexpected turn of events since web components are supposed to prevent light DOM styling from leaking into the component. In addition, I am using the following css rule which is supposed to prevent such a thing from happening: :host { all: initial; } Any ideas? 回答1: Polymer by default doesn't

How to implement long-press event using Polymer1.0?

三世轮回 提交于 2020-01-24 04:34:26
问题 It seems like long-press event is not part of the Polymer's specifications. How would you implement that ? I thought about using a behavior and using down and up event with some debounce tricks to manage such a new event but that means I have to make a custom element to use this behavior and can't for example use it directly on any elements I want like : <div on-long-press="_cheese">...</div> which is not convenient. Would you have other solutions ? 回答1: You don't have to make a custom

Is Polymer v1.0 compatible with phonegap build?

倾然丶 夕夏残阳落幕 提交于 2020-01-22 00:24:51
问题 Is Polymer v1.0 compatible with phonegap build? I tried to build the polymer starter kit but the build was not a success. 回答1: @Ahemed, Polymer is new and experimental. It works with only a few browsers. Phonegap, at this time, does NOT support polymer. Your questions are best directed to the one and only (as of the moment) meetup group in Silicon Valley on this subject. http://www.meetup.com/Web-Components-Silicon-Valley-Meetup/ Best of Luck. 来源: https://stackoverflow.com/questions/31636632

Firebase Auth and Google Calendar using Polymer

情到浓时终转凉″ 提交于 2020-01-17 05:08:07
问题 Referencing Firebase Auth and Google Calendar, how do I do this with Polymer elements? On my page, I added a google-signin element <google-signin client-id="xxxx.apps.googleusercontent.com"> </google-signin> I then waited for the google-signin-success event to be fired and got the access token with gapi.auth2.getAuthInstance().currentUser.get().hg.access_token) How do I login with firebase-auth? I tried adding the firebase-auth element like so in my page <firebase-auth id="authenticate" user=

iron-selector selected={{}} binding with iron-pages selected={{}} (Switcheroo)

旧城冷巷雨未停 提交于 2020-01-17 04:59:20
问题 So i made a custom-menu with iron-selector and put it inside on another custom element wich contains iron-pages and i can't bind the buttons of my menu with the content of the pages. Basically a Switcheroo with custom elements. Here is some code (simplified): my-menu <dom-module id="my-menu"> <style> :host {display: inline-block; } </style> <template> <iron-selector id="menu" selected="{{menuSelected}}" attr-for-selected="name-menu"> <div name-menu="portfolio" class="button"></div> <div name

Polymer dom repeat is not working for Select Option in IE

折月煮酒 提交于 2020-01-17 03:04:46
问题 Hi i am using bellow code to create a polymer dropdown element.It is working fine in all browsers except IE. fruits-list.html <link href="https://rawgit.com/polymer/polymer/0.8-preview/polymer.html" rel="import"> <dom-module id="fruits-list"> <template> <select> <template is="dom-repeat" items="{{employees}}"> <option value="{{item.value}}">{{item.text}}</option> </template> </select> </template> <script> Polymer({ is: 'fruits-list', ready: function() { this.employees = [ {value: 'one', text: