CSS animations
This commit is contained in:
@@ -132,26 +132,12 @@ static func parse_scale_utility(utility_name: String) -> Dictionary:
|
||||
static func parse_rotation_utility(utility_name: String) -> Dictionary:
|
||||
var result = {}
|
||||
|
||||
if utility_name.begins_with("rotate-x-"):
|
||||
var val = utility_name.substr(9) # after "rotate-x-"
|
||||
if val.begins_with("[") and val.ends_with("]"):
|
||||
val = val.substr(1, val.length() - 2)
|
||||
var rotation = parse_rotation(val)
|
||||
result["rotate-x"] = rotation
|
||||
return result
|
||||
elif utility_name.begins_with("rotate-y-"):
|
||||
var val = utility_name.substr(9) # after "rotate-y-"
|
||||
if val.begins_with("[") and val.ends_with("]"):
|
||||
val = val.substr(1, val.length() - 2)
|
||||
var rotation = parse_rotation(val)
|
||||
result["rotate-y"] = rotation
|
||||
return result
|
||||
elif utility_name.begins_with("rotate-"):
|
||||
if utility_name.begins_with("rotate-"):
|
||||
var val = utility_name.substr(7) # after "rotate-"
|
||||
if val.begins_with("[") and val.ends_with("]"):
|
||||
val = val.substr(1, val.length() - 2)
|
||||
var rotation = parse_rotation(val)
|
||||
result["rotate-z"] = rotation # Default rotation is around Z-axis
|
||||
result["rotate"] = rotation
|
||||
return result
|
||||
|
||||
return result
|
||||
|
||||
@@ -43,8 +43,9 @@ static func init_patterns():
|
||||
"^cursor-[a-zA-Z-]+$", # cursor types
|
||||
"^scale-(x-|y-)?\\d+$", # scale utilities like scale-100, scale-x-75, scale-y-150
|
||||
"^scale-(x-|y-)?\\[.*\\]$", # custom scale values like scale-[1.5], scale-x-[2.0]
|
||||
"^rotate-(x-|y-)?\\d+$", # rotation utilities like rotate-45, rotate-x-90, rotate-y-180
|
||||
"^rotate-(x-|y-)?\\[.*\\]$", # custom rotation values like rotate-[45deg], rotate-x-[90deg], rotate-y-[3.5rad]
|
||||
"^rotate-\\d+$", # rotation utilities like rotate-45, rotate-90
|
||||
"^rotate-\\[.*\\]$", # custom rotation values like rotate-[45deg], rotate-[3.5rad]
|
||||
"^transition(-colors|-opacity|-transform)?$", # transition utilities
|
||||
"^(hover|active):", # pseudo classes
|
||||
]
|
||||
for pattern in utility_patterns:
|
||||
|
||||
Reference in New Issue
Block a user