Condition is checking now x axis, y axis and css