Comments (5)
Hi @lozandier
paper-toast
alignment abilities is not a lie, you just have to use it right:
- have a look at how to use polygit.org, you should point to paper-toast master branch -> polygit.org/paper-toast+:master/components/
fitInto
must be an HTMLElement, not a string (you passed an id of an element that is not in thedocument
root, but inside thex-test
root, hencedocument.getElementById('section')
won't work) -> set it on ready, or bind it to a privatex-test
property (whatever is more convenient for you)verticalOffset
must be a number, not a string (s/10vh/10
); it is the same as setting margin-top/margin-bottom in csss/vertialAlign/verticalAlign
s/vertialOffset/verticalOffset
Here you go http://jsbin.com/nehejo/2/edit?html,output
from paper-toast.
Understood, thanks for the thorough response to this, @valdrinkoshi; have a splendid weekend.
from paper-toast.
FYI, published v1.3.0
, so no need to point to the master branch
from paper-toast.
@valdrinkoshi Epic use of emojis .
Terrible typos & misuses on my part trying to recreate the issues (including the fitInto
part that was an error with my example, but was correctly referencing an actual element programmatically prior to spending time creating an isolated use case from my colleague's futile efforts).
There's still confusing behavior I wouldn't mind for you to clear-up that I and my colleague whose code lead me to write this issue:
- If setting
verticalOffsest
is the same as setting margin-top/margin-bottom in CSS, why can't units be used likevh
or I'm misunderstanding that statement? I'm of the opinion that statement assumes that the string be scrutinized by methods not enabling consumers to specify the units they find most useful. - While knowing (but somehow forgetting in my glee of having an real world opportunity to use "The Cake Is Lie" meme for a Github issue)
fitInto
accepting an element node (HTMLElement
) , wouldn't there be value forfitInto
to accommodate being used programmatically & declaratively by accepting an element node OR a string? The string can be handled with logic like(typeof param === 'string')…
this.parentElement.querySelector(query) || document.currentScript.ownerDocument.querySelector('query');`
I'd happily do a PR for that.
from paper-toast.
Hi @lozandier
verticalOffset, horizontalOffset, verticalAlign, horizontalAlign
were previously properties ofiron-dropdown
, I moved them toiron-fit-behavior
so that all overlays can benefit from them.verticalOffset, horizontalOffset
in particular were kept in order not to make a breaking change, but ideally they should be deprecated/removed in favor of just using margins in css. That said, I believe it might be possible to accept a css value, feel free to give it a shot https://github.com/PolymerElements/iron-fit-behavior/blob/master/iron-fit-behavior.html#L286- About
fitInto
accepting a string, that could be a great enhancement!
Could you open an issue for each in https://github.com/PolymerElements/iron-fit-behavior/ & do the PR there please? 🍰
Closing this
from paper-toast.
Related Issues (20)
- Hide then show toast HOT 5
- open() close() etc. methods HOT 1
- Allow custom styling for paper-toast HOT 2
- Toast remaining as invisible barrier in Chrome
- override resetFit rather than center
- The `paper-toast` element is hidden from drawer content on iPad with Safari HOT 4
- <paper-toast> is partially hidden by app-drawer HOT 12
- Pattern to create multiple toast HOT 2
- , HOT 2
- paper-toast doesn't support center alignment HOT 7
- paper-toast does not scroll correctly when fitInto is set. HOT 1
- Callback when toast closes HOT 1
- Button within toast falls out of alignment upon receiving keyboard focus. HOT 3
- Align button HOT 1
- noCancelOnOutsideClick is false but still not closes the toast on clicking on 'paper-tabs' area HOT 2
- this element doesn't appear in any collection webcomponents.org HOT 4
- Toast fitInto/fit-bottom not working correctly. HOT 5
- calling hide() function on paper-toast loses focus on paper-input inside paper-dialog HOT 5
- On-tap doesn't work on mobile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paper-toast.