Closed jamesmgg closed 8 years ago
Any ideas @Zecat?
@Zecat, I figured out what the issue is... your web-component does not support the shadow dom, which is what I'm using.
Related issue, and likely due to the same reason, the scope of elements inside steppers is changing resulting in css from the scope the element is part of not applying.
This is likely due to the fact that paper-stepper is appending effective children into the horizontal/vertical stepper instead of using <content>
nodes. This relocates elements from the parent scope into the local scope, which in ShadyDOM ruins the css scope and in Shadow DOM is straight up invalid.
Oh that is a problem, thanks for your research.
I admit this is quite obscure for me like I'm not experienced with the intricacies of shadow dom. I noticed the problem doesn't come from the dynamic creation of horizontal/vertical steppers in paper-stepper (I did that to fix #4 ) because try to use directly <paper-horizontal-stepper>
and <paper-vertical-stepper>
without the <paper-stepper>
wrapper, the error is the same.
I think the cause is <paper-horizontal-step>
and <paper-vertical-step>
are dynamically created and appended in the oriented stepper, but yea, same CSS scope problem.
<script>
// add this in demo/index.html <head> to force shadow dom
window.Polymer = {
dom: 'shadow'
lazyRegister: true
};
</script>
scope = document.getElementById('scope');
var step1 = scope.$.step1;
Uncaught TypeError: Cannot read property 'step1' of undefined
#stepSelector > paper-horizontal-step:first-of-type ::content #leftConnectorLine,
#stepSelector > paper-horizontal-step:last-of-type ::content #rightConnectorLine {
display: none;
}
:host[opened] paper-badge, :host[completed] paper-badge {
--paper-badge-background: var(--default-primary-color, --google-blue-500);
}
Could be replaced anyway by a simple CSS height transition
paper-vertical-step: roll-up-animation not found!
paper-vertical-step: unroll-animation not found!
Good work @Zecat!
Hello, the paper-stepper sort of works, though I'm getting the exception below when using the paper stepper. When I say it sort of works, is that it looks like the image below. Clicking through it works, but it's not styled properly.