polymer

Cannot remove overlapping box-shadow

一笑奈何 提交于 2019-12-11 03:38:18
问题 More specifically, i'm using polymer paper-shadow. I'm trying to remove two sides of a paper-shadow box to create a simple arrow box, but I can't seem to get rid of it. I've tried removing the position: absolute , but that doesn't seem to get rid of the overlapping behavior. Here's what my html/css look like: HTML: <div class="content-container"> <paper-shadow z="1"> <div class="content"> <h1>{{heading}}</h1> <content></content> </div> <paper-shadow class="triangle" z="1"> </paper-shadow> <

Is the content element used in Polymer 1.0?

情到浓时终转凉″ 提交于 2019-12-11 03:33:36
问题 https://www.polymer-project.org/1.0/docs/devguide/local-dom#dom-distribution In the above link under "Dom Distribution" it says: To support composition of an element's light DOM with its local DOM, Polymer supports the <content> element. ... Just wondering if this is out of date? Does Polymer 1.0 use slots as described here? https://developers.google.com/web/fundamentals/primers/shadowdom/?hl=en#composition_slot 回答1: It's definitely working in Polymer 1.0, even with Shadow DOM; I'm currently

updated to newest version of polymer and input validation is no longer working

天大地大妈咪最大 提交于 2019-12-11 03:27:06
问题 <paper-input id="server" floatinglabel="" label="Server Address" value="" required type="URL"> </paper-input> the example above worked until the latest polymer update now even the required attribute does nothing. was there some change to core-input that i am missing in documentation? all my inputs with patterns, numbers, urls, or emails nothing causes it to get the invalid class. 回答1: <paper-input-decorator id="address" labelVisible floatinglabel error="URL Required" label="Server Address">

Polymer function call with parameters

烂漫一生 提交于 2019-12-11 03:26:50
问题 This seems like a very simple one, but somehow I am not sure how to do it. I want to send data to a Polymer component with the "core-collapse-open" event but this is not working: <core-collapse on-core-collapse-open="{{loadDetails(data)}}"> {{data.Title}} ... When I use the above code, the loadDetails function in polymer is not hitting. Polymer('custom-item', { data: {}, ready: function () { }, loadDetails: function (e, details, sender) { debugger; } }); If I am not using the function syntax

Polymer: Layout screwed up in Firefox, fine in Chrome

邮差的信 提交于 2019-12-11 03:22:46
问题 So, I am aware the web components, Shadow DOM and such is only implememted natively in Chrome today. For support in Firefox, Polyfill is needed. According to the website, Polymer has polyfill support in Firefox: https://www.polymer-project.org/resources/compatibility.html but when I have made a very simple page, it looks completely screwed up i Firefox. But, if I try the Polymer website in Firefox, it works there without any obvious problems . Test URL: http://misc.snapcode.se/polymer/ Here

How to apply global css to web components through shadow-dom

大憨熊 提交于 2019-12-11 03:21:37
问题 I'm working on a lit-element project, and I got a problem that reset.css cannot be applied to web components wrapped with shadow-root I've tried this way, and I got this following error. Refused to apply style from 'http://localhost:8080/style/static/reset.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. The code I tried is this: <script> var css = new CSSStyleSheet() css.replace('@import url("./style/static/reset.css")')

core-list-dart: How access variable (@observable) outside data attribute

回眸只為那壹抹淺笑 提交于 2019-12-11 03:03:39
问题 I'm trying to apply a filter through a variable (asDateTime) for a given column to the core-list-dart. This variable is outside of the content data attribute (model). When I access this variable, an error is throws. See the code: * dominio.dart * class ContaPagar { ... List<ContaPagarParcela> contaPagarParcelas; } class ContaPagarParcela { ... DateTime dataVencimento; } * filter.dart * class StringToDateTime extends Transformer<String, DateTime> { String forward(DateTime dateTime) { String

Polymer: get the value of paper-input inside a paper-dialog after paper-button press “ok”

浪子不回头ぞ 提交于 2019-12-11 02:59:34
问题 i need to get the value of some paper-input fields inside a paper-dialog after a press on a "ok" paper-button. I have: ... <paper-dialog id="notediag" heading="Add Note" transition="paper-dialog-transition-center"> <paper-input id="dialog-add-note-header" label="Header" value="{{valHeader}}"></paper-input> <br> <paper-input id="dialog-add-note-text" label="Text"></paper-input> <paper-button label="Cancel" dismissive></paper-button> <paper-button label="Ok" affirmative default on-click="{

document.createElement multiple arguments

故事扮演 提交于 2019-12-11 02:59:15
问题 I was reading through the polymer documentation, and I saw this: var el2 = document.createElement('input', 'my-input'); Source Forgetting about polymer for a second, can document.createElement currently take 2 arguments? Is it related to Polymer's type-extensions? Side note: Webstorm was "complaining" when I called it with 2 arguments. 回答1: At the moment, document.createElement will only take one parameter (Ignoring the second). It does appear that there is a spec that will allow you to pass

How to declare and bind to properties with type=“object” in Polymer 1.0

我的梦境 提交于 2019-12-11 02:58:51
问题 I'm having an issue understanding how Polymer 1.0 handles declared properties, specifically those with the type="object". In order to figure this out I am trying to create a simple element to select a material type and display things about it. Here is what my element looks like so far <dom-module id="mat-panel"> <style> :host { background: blue; } </style> <template> <iron-selector attr-for-selected="name" selected="{{material}}"> <div name="polyester">Polyester</div> <div name="nylon">Nylon<