def animation_easing(): value = Random.choice([ "linear", "ease", "ease-in", "ease-out", "ease-in-out", "cubic-bezier" ]) if value == "cubic-bezier": value += "({})".format(seq([Random.number() for _ in range(4)])) return value
def generate(self, _): c = Random.selector(3) if c == 0: self.value = Random.choice(["auto", "auto-start-reverse"]) elif c == 1: self.value = dv.angle() else: self.value = Random.number()
def length(relative=False): if (not relative) or Random.bool(): if Random.bool(): return "{}px".format(Random.integer()) else: return "{}em".format(Random.number()) else: return "{}{}".format(Random.integer(), Random.choice(["vw", "vh", "vmin", "vmax"]))
def generate(self, _): num = Random.range(1, 2) self.value = cat([Random.number() for _ in range(num)])
def generate(self, _): if Random.bool(): self.value = dv.length_percentage() else: self.value = Random.number()
def generate(self, _): self.value = seq([Random.number() for _ in range(4)])
def generate(self, _): self.value = Random.number()
def scale(): num = Random.range(1, 2) value = seq([Random.number() for _ in range(num)]) return "scale({})".format(value)
def generate(self, _): self.value = "{{ delay: {}, direction: \"{}\", duration: {}, easing: \"{}\", endDelay: {}, fill: \"{}\", " \ "iterationStart: {}, iterations: {} }}".format( dv.clock_in_ms(), dv.animation_direction(), dv.clock_in_ms(), dv.animation_easing(), dv.clock_in_ms(), dv.animation_fill_mode(), Random.number(), Random.integer())
def rotate3d(): values = [Random.number() for _ in range(3)] values.append(angle()) return "rotate3d({})".format(seq(values))
def scale_z(): return "scaleZ({})".format(Random.number())
def scale3d(): value = seq([Random.number() for _ in range(3)]) return "scale3d({})".format(value)
def matrix3d(): value = seq([Random.number() for _ in range(16)]) return "matrix3d({})".format(value)
def scale_y(): return "scaleY({})".format(Random.number())
def scale_x(): return "scaleX({})".format(Random.number())
def generate(self, _): if Random.bool(): self.value = cat([Random.number() for _ in range(20)]) else: self.value = Random.float01()
def generate(self, _): self.value = "{{top: {}, left: {}, behavior: \"{}\"}}".format( Random.number(), Random.number(), Random.choice(["auto", "smooth"]))
def number_percentage(): if Random.bool(): return Random.number() else: return percentage()
def generate(self, _): if Random.bool(): self.value = "auto" else: self.value = Random.number()
def number_optional_number(signed): if signed: return seq([Random.signed_number(), Random.signed_number()]) else: return seq([Random.number(), Random.number()])