-
Notifications
You must be signed in to change notification settings - Fork 15
Ripple does not respect border-radius of parent element or itself #28
Comments
The ripple no longer uses canavs, but css: The border-radius should also be inherited from the container as of
|
Version 39.0.2171.95 (64-bit) -- on Linux I did just test on Chrome Beta on Android and I still see the issue. (Not the paper-ripple class=circle, but the top buttons and "+1" buttons below - quite subtle because of ~2px border-radius, but I can see square edges when tapping :/) |
Managed to get screencasts of each: Desktop: http://webmup.com/SvNZq/vid.webm |
Update: This maybe a webkit/blink issue - tests on Firefox Developer show correct clipping of the ripple, but Opera had the same problems as Chrome |
Just noticed this issue manifesting itself more significantly in the calculator demo app. Once again only Blink is affected |
This appears to be due to the use of |
The above reproduces in Safari 8. |
Per http://stackoverflow.com/questions/17300806/overflow-hidden-with-border-radius-and-translate3d#comment27193597_17303073, this appears to be resolved by applying a trivial Updated test case: http://jsbin.com/temexa/2 |
this will solve the issue..:) |
FWIW, I was having this issue with Chrome 45.0.2454.99 when I had "Device mode" activated in the developer tools. Without "device mode", the ripple did respect the border radius applied to the paper-button. |
This can achieve by css, see code below, <dom-module id="app-index">
<style is="custom-style">
:root{
--my-custom-color: #ffb6c1;
--paper-tab-ink: var(--my-custom-color);
}
paper-tabs{
{
--paper-tabs:{
background-color: pink;
border-radius: 100px;
color: white;
}
};
{
--my-ripple-color: pink;
--paper-tab-ink: var(--my-ripple-color);
}
}
paper-tab.iron-selected {
color: pink;
background-color: white;
border-radius: 100px;
}
paper-tab{
height: 94% !important;
top: 2px;
left: 2px;
margin-right: 4px;
}
</style>
<template>
<app-location route="{{route}}" url-space-regex="/polymer-test/demo/.*"></app-location>
<app-route route="{{route}}" pattern="/polymer-test/demo/:tabName" data="{{data}}" tail="{{subroute}}" active="{{known}}">
</app-route>
<paper-tabs selected='{{data.tabName}}' attr-for-selected='key' no-bar>
<paper-tab key='foo' route="{{subroute}}">Foo</paper-tab>
<paper-tab key='bar' route="{{subroute}}">Bar</paper-tab>
<paper-tab key='baz' route="{{subroute}}">Baz!</paper-tab>
</paper-tabs>
<neon-animated-pages selected='[[data.tabName]]'
attr-for-selected='key'
entry-animation='slide-from-left-animation'
exit-animation='fade-out-animation'>
<neon-animatable key='foo'><my-test></my-test></neon-animatable>
<neon-animatable key='bar'>Bar Page Goes Here</neon-animatable>
<neon-animatable key='baz'>Baz Page, the Best One of the Three</neon-animatable>
</neon-animated-pages>
</template>
<script>
Polymer({
is: "app-index",
observers: [
'_routeChanged(route.*)',
'_viewChanged(data.tabName)'
],
_routeChanged: function(changeRecord) {
if (changeRecord.path === 'path') {
console.log('Path changed!');
}
},
message: function(fav) {
if (fav) {
return "You really like me!";
} else {
return "Do you like me?";
}
},
_viewChanged: function(data){
console.log(data);
},
ready: function(){
}
});
</script>
</dom-module> |
Original discussion was previously had for paper-tabs [0], though not specific to that component. This still appears unresolved - the paper-ripple demo page [1] shows the ripple leaking outside of the border radii of various elements with rounded corners. Setting border-radius on paper-ripple has no effect - the bug is likely rooted in the canvas implementation of the ripple.
The paper-button element does not suffer from this issue, but this is not default behaviour.
[0] googlearchive/paper-tabs#3
[1] http://www.polymer-project.org/components/paper-ripple/demo.html
The text was updated successfully, but these errors were encountered: