ng enter and ng leave animations not working with ion-view - ionic-framework

How do I get ng-enter and ng-leave animations to work in ion-view?
<ion-view class="kitchenmenu"></ion-view>
CSS:
.kitchenmenu{background:yellow}
.kitchenmenu.ng-leave {
-webkit-animation: animated slideInDown 0.5s both ease-in;
-moz-animation:animated slideInDown 0.5s both ease-in;
animation: animated slideInDown 0.5s both ease-in;
}
.kitchenmenu.ng-enter {
-webkit-animation:animated slideInUp 0.5s both ease-in;
-moz-animation:animated slideInUp 0.5s both ease-in;
animation:animated slideInUp 0.5s both ease-in;
}
The above however does not work. I tried adding ng-view directive to it as well but no help.

Related

How to theme GTK OSD?

I use Mate desktop 1.26 (GTK 3.24) and I want to update my CSS theme for OSD.
Is there a way with a very simple program to keep OSD displayed to debug it with GTK-inspector? Or is someone know the CSS nodes?
The first screenshot was taken with default theme, the second with my theme. I try to remove the black border, to set the background color I use the following piece of code, but it's ridiculous:
.osd * {
background: #theme_bg;
}
EDIT: I found an horrible way, it seems that we can't change the black border width (12px):
.osd {
border: 12px solid #nb_border;
border-radius: 0;
background: #theme_bg;
}
.osd > box {
background: #theme_bg;
box-shadow:
0 -11px #theme_bg, /* top */
11px 0 #theme_bg, /* right */
0 11px #theme_bg, /* bottom */
-11px 0 #theme_bg, /* left */
-11px -11px #theme_bg, /* top left */
11px -11px #theme_bg, /* top right */
11px 11px #theme_bg, /* bottom right */
-11px 11px #theme_bg /* bottom left */;
}

How to change color of Slider hover and active "shadow"

I'm using Material-UI and Styled-Components. And I'm struggling with changing the color of the slider. I've been able to change the color of the thumb and track. But when hovering over and clicking the thumb, a blue haze surrounds the thumb. How do I change the color of this?
I've been able to style other parts (track, ticks, thumb etc) using the classes mentioned in the API (https://material-ui.com/api/slider/#css). But not this shadow effect.
https://codesandbox.io/s/ecstatic-satoshi-3mzrj?file=/src/App.js
The shadow effect is also a part of thumb.
You can simply use something like
& .MuiSlider-thumb:hover {
color: red;
box-shadow: 0 0 0 10px rgba(0, 255, 0, 0.3) !important;
}
or if you don't want to use !important, try to manipulate it with this class:
.MuiSlider-thumb.Mui-focusVisible, .MuiSlider-thumb:hover {
// your code here
}

GWT sprites with explicit dimensions are not scaled

We're running into a problem trying to use GWT sprites for different-sized buttons, using the same background image, like so:
#Source("background.png")
#ImageOptions(width=200,height=50)
ImageResource wideButton();
#Source("background.png")
#ImageOptions(width=100,height=50)
ImageResource narrowButton();
In the css we use the image resource like so:
#sprite .wideButton {
gwt-image: "wideButton"; }
#sprite .wideButton {
gwt-image: "narrowButton"; }
This produces DIV elements with the proper dimension, but it does not display the image properly when these dimensions are smaller than the image's original width and height: the picture is cropped to fit, rather than scaled.
Setting the width and height in the css does not solve the display problem.
#sprite .wideButton {
gwt-image: "narrowButton";
width: 100px;
height: 50px;
}
Is there a way to make this work, or were sprites simply not designed to be used in this way? Thanks in advance.

Element gets blurry after transition or animation

After I use CSS transition or animation that includes rotate the whole containing div gets a little bit blurry,
I read that it is some kind of side effect from redrawing the element, but is there a way to prevent it?
.toggle {
position: absolute;
width: 36px;
height: 36px;
bottom: 7px;
right: 94px;
z-index: 200;
background: transparent url("../img/handle-open.png") no-repeat;
-webkit-transition: all 1s cubic-bezier(0.91,0.00,1.00,1.00);
-moz-transition: all 1s cubic-bezier(0.91,0.00,1.00,1.00);
transition: all 1s cubic-bezier(0.91,0.00,1.00,1.00);
}
.toggle-closed {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
}
I tries to achieve the same with animate and got the same result
Update: I noticed something weird happening - in chrome, when the animation runs the element gets blurry and when the animation stops it return to normal,
on iOS however it happens the other way around - the image is clear while animated but gets blurry when completed! another weird #$$ bug!?
Ive seen issues such as this before after doing animations. Check the dimensions of the object after the transition, it may very well have changed in size by a few points causing blurry-ness. i,e:
Before transition: 36x36
After Transition: 36.2 x 36.8

Get background-position

I'm trying to animate a canvas on three different layers on the onmousedown and ontouchstart. The three canvas go from left to right at a different speed to give a perspective effect as long as the onmouseup or ontouchend are not fired.
I am using #-webkit-keyframes css to do my animations:
#-webkit-keyframes aCarsRight
{
from{background-position: 0px 0px;}
to{background-position: 640px 0px;}
}
.cars_move_right
{
-webkit-animation-name: aCarsRight;
-webkit-animation-duration: 5s;
-webkit-animation-iteration-count: 1;
-webkit-transition-timing-function: linear;
}
What I would like to do is get the current background-position of the three layers prior to disabling the pan animation and set them manually so when I remove the .cars_move_right class from my div is stays in the same position instead of rolling back to its default position.
Is there a way to get the background-position or just a work around to get what I want? The page is meant for iPhone and iPod Touch.
Thanks !
I found something interesting. Instead of grabbing the background-position, stop the animation and set the background-position to my divs, I pause the animation.
document.getElementById('global').style.webkitAnimationPlayState = 'paused';
document.getElementById('global_cars').style.webkitAnimationPlayState = 'paused';
document.getElementById('global_car').style.webkitAnimationPlayState = 'paused';
Haven't had the chance to test it on iPhone yet.
And, here's a method that seems to work cross-browswers to get any property:
window.getComputedStyle(document.getElementById('div'))['background-position'];
Have you tried:
var blah = ele.style.backgroundPosition;
That will return it like "10px 57px"
If the css rule has a hyphen in it then afaik in Javascript the hyphen is removed and camel case applied.
I found that I can use this to get the property I couldn't get with [mydiv].style.[property]
function getProperty(property, div)
{
return window.getComputedStyle(document.getElementById(div))[property];
}