Skip to content

Commit

Permalink
update - add more css properties
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Jan 10, 2025
1 parent bbf14b2 commit 55aa4ba
Show file tree
Hide file tree
Showing 122 changed files with 359 additions and 239 deletions.
8 changes: 4 additions & 4 deletions build/data/styles/values/single_animation_directions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
from prebuild import Prebuild

single_animation_directions = [
Value().set_generate_name("normal").set_text(Lang.EN, "normal").set_text(Lang.FA, "عادی"),
Value().set_generate_name("reverse").set_text(Lang.EN, "reverse").set_text(Lang.FA, "برعکس"),
Value().set_generate_name("alternate").set_text(Lang.EN, "alternate").set_text(Lang.FA, "متناوب"),
Value().set_generate_name("alternate-reverse").set_text(Lang.EN, "alternate-reverse").set_text(Lang.FA, "متناوب برعکس"),
Value().set_generate_name("normal").add_text(Lang.EN, "normal").add_text(Lang.FA, "عادی"),
Value().set_generate_name("reverse").add_text(Lang.EN, "reverse").add_text(Lang.FA, "برعکس"),
Value().set_generate_name("alternate").add_text(Lang.EN, "alternate").add_text(Lang.FA, "متناوب"),
Value().set_generate_name("alternate-reverse").add_text(Lang.EN, "alternate-reverse").add_text(Lang.FA, "متناوب برعکس"),
]

if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion build/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def set_generate_name(self, generate_name):
idtok = Prebuild.idize(generate_name.upper())
self.id = "AST_LAYOUT_TYPE_" + idtok

def set_text(self, language_code, text):
def add_text(self, language_code, text):
"""Set text for the main element."""
self.text.add_translation(language_code, text)

Expand Down
2 changes: 1 addition & 1 deletion build/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def set_generate_name(self, generate_name):
self.id = "AST_LAYOUT_TYPE_" + idtok
return self

def set_text(self, language_code, text):
def add_text(self, language_code, text):
"""Set text for the main element."""
self.text.add_translation(language_code, text)
return self
Expand Down
6 changes: 3 additions & 3 deletions build/styles/accent-color.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("accent-color")
property.set_text(Lang.EN, "accent-color")
property.set_text(Lang.FA, "رنگ اسنت")
property.add_text(Lang.EN, "accent-color")
property.add_text(Lang.FA, "رنگ اسنت")
property.set_type(Type.Color)
property.add_reserve_values(
Value().set_generate_name("auto").set_text(Lang.EN, "auto").set_text(Lang.FA, "اتو"),
Value().set_generate_name("auto").add_text(Lang.EN, "auto").add_text(Lang.FA, "اتو"),
)

property_dict = property.to_dict()
Expand Down
4 changes: 2 additions & 2 deletions build/styles/align-content.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("align-content")
property.set_text(Lang.EN, "align-content")
property.set_text(Lang.FA, "تراز محتوا")
property.add_text(Lang.EN, "align-content")
property.add_text(Lang.FA, "تراز محتوا")
property.set_type(Type.String)
property.add_reserve_values([
Value().set_generate_name("normal").add_text(Lang.EN, "normal").add_text(Lang.FA, "نرمال"),
Expand Down
4 changes: 2 additions & 2 deletions build/styles/align-items.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("align-items")
property.set_text(Lang.EN, "align-items")
property.set_text(Lang.FA, "الاین-آیتمز")
property.add_text(Lang.EN, "align-items")
property.add_text(Lang.FA, "الاین-آیتمز")
property.set_type(Type.String)
property.add_reserve_values([
Value().set_generate_name("normal").add_text(Lang.EN, "normal").add_text(Lang.FA, "نرمال"),
Expand Down
4 changes: 2 additions & 2 deletions build/styles/align-self.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("align-self")
property.set_text(Lang.EN, "align-self")
property.set_text(Lang.FA, "تراز خود")
property.add_text(Lang.EN, "align-self")
property.add_text(Lang.FA, "تراز خود")
property.set_type(Type.String)
property.add_reserve_values([
Value().set_generate_name("auto").add_text(Lang.EN, "auto").add_text(Lang.FA, "اتوماتیک"),
Expand Down
4 changes: 2 additions & 2 deletions build/styles/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("all")
property.set_text(Lang.EN, "all")
property.set_text(Lang.FA, "همه")
property.add_text(Lang.EN, "all")
property.add_text(Lang.FA, "همه")
property.set_type(Type.String)
property.add_reserve_values([
Value().set_generate_name("initial").add_text(Lang.EN, "initial").add_text(Lang.FA, "ابتدایی"),
Expand Down
4 changes: 2 additions & 2 deletions build/styles/animation-delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("animation-delay")
property.set_text(Lang.EN, "animation-delay")
property.set_text(Lang.FA, "تاخیر انیمیشن")
property.add_text(Lang.EN, "animation-delay")
property.add_text(Lang.FA, "تاخیر انیمیشن")
property.set_type(Type.Times)

property_dict = property.to_dict()
Expand Down
4 changes: 2 additions & 2 deletions build/styles/animation-direction.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("animation-direction")
property.set_text(Lang.EN, "animation-direction")
property.set_text(Lang.FA, "جهت انیمیشن")
property.add_text(Lang.EN, "animation-direction")
property.add_text(Lang.FA, "جهت انیمیشن")
property.set_type(Type.Strings)
property.set_values(single_animation_directions.single_animation_directions)

Expand Down
4 changes: 2 additions & 2 deletions build/styles/animation-duration.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("animation-duration")
property.set_text(Lang.EN, "animation-duration")
property.set_text(Lang.FA, "طول انیمیشن")
property.add_text(Lang.EN, "animation-duration")
property.add_text(Lang.FA, "طول انیمیشن")
property.set_type(Type.Time)

property_dict = property.to_dict()
Expand Down
63 changes: 63 additions & 0 deletions build/styles/animation-fill-mode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"id": "AST_LAYOUT_TYPE_ANIMATION_FILL_MODE",
"generate_name": "animation-fill-mode",
"type": "AST_TYPE_STRING",
"text": {
"EN": [
"animation-fill-mode"
],
"FA": [
"شیوه پر شدن انیمیشن"
]
},
"reserved_values": [
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_NORMAL",
"generate_name": "normal",
"text": {
"EN": [
"normal"
],
"FA": [
"عادی"
]
}
},
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_REVERSE",
"generate_name": "reverse",
"text": {
"EN": [
"reverse"
],
"FA": [
"برعکس"
]
}
},
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_ALTERNATE",
"generate_name": "alternate",
"text": {
"EN": [
"alternate"
],
"FA": [
"متناوب"
]
}
},
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_ALTERNATE_REVERSE",
"generate_name": "alternate-reverse",
"text": {
"EN": [
"alternate-reverse"
],
"FA": [
"متناوب برعکس"
]
}
}
]
}
4 changes: 2 additions & 2 deletions build/styles/animation-fill-mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("animation-fill-mode")
property.set_text(Lang.EN, "animation-fill-mode")
property.set_text(Lang.FA, "شیوه پر شدن انیمیشن")
property.add_text(Lang.EN, "animation-fill-mode")
property.add_text(Lang.FA, "شیوه پر شدن انیمیشن")
property.set_type(Type.Strings)
property.add_reserve_values(single_animation_directions.single_animation_directions)

Expand Down
27 changes: 27 additions & 0 deletions build/styles/animation-iteration-count.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"id": "AST_LAYOUT_TYPE_ANIMATION_ITERATION_COUNT",
"generate_name": "animation-iteration-count",
"type": "AST_TYPE_NUMBER_POSITIVE",
"text": {
"EN": [
"animation-iteration-count"
],
"FA": [
"تعداد تکرار انیمیشن"
]
},
"reserved_values": [
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_INFINITE",
"generate_name": "infinite",
"text": {
"EN": [
"infinite"
],
"FA": [
"بی‌پایان"
]
}
}
]
}
6 changes: 3 additions & 3 deletions build/styles/animation-iteration-count.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("animation-iteration-count")
property.set_text(Lang.EN, "animation-iteration-count")
property.set_text(Lang.FA, "تعداد تکرار انیمیشن")
property.add_text(Lang.EN, "animation-iteration-count")
property.add_text(Lang.FA, "تعداد تکرار انیمیشن")
property.set_type(Type.PositiveInt)
property.add_reserve_values([
Value().set_generate_name("infinite").set_text(Lang.EN, "infinite").set_text(Lang.FA, "بی‌پایان"),
Value().set_generate_name("infinite").add_text(Lang.EN, "infinite").add_text(Lang.FA, "بی‌پایان"),
])

property_dict = property.to_dict()
Expand Down
27 changes: 27 additions & 0 deletions build/styles/animation-name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"id": "AST_LAYOUT_TYPE_ANIMATION_NAME",
"generate_name": "animation-name",
"type": "AST_TYPE_ANY",
"text": {
"EN": [
"animation-name"
],
"FA": [
"نام انیمیشن"
]
},
"reserved_values": [
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_NONE",
"generate_name": "none",
"text": {
"EN": [
"none"
],
"FA": [
"هیچ‌کدام"
]
}
}
]
}
6 changes: 3 additions & 3 deletions build/styles/animation-name.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("animation-name")
property.set_text(Lang.EN, "animation-name")
property.set_text(Lang.FA, "نام انیمیشن")
property.add_text(Lang.EN, "animation-name")
property.add_text(Lang.FA, "نام انیمیشن")
property.set_type(Type.AnyNoEmpty)
property.add_reserve_values([
Value().set_generate_name("none").set_text(Lang.EN, "none").set_text(Lang.FA, "هیچ‌کدام"),
Value().set_generate_name("none").add_text(Lang.EN, "none").add_text(Lang.FA, "هیچ‌کدام"),
])

property_dict = property.to_dict()
Expand Down
4 changes: 2 additions & 2 deletions build/styles/animation-play-state.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("animation-play-state")
property.set_text(Lang.EN, "animation-play-state")
property.set_text(Lang.FA, "وضعیت پخش انیمیشن")
property.add_text(Lang.EN, "animation-play-state")
property.add_text(Lang.FA, "وضعیت پخش انیمیشن")
property.set_type(Type.Strings)
property.add_reserve_values(single_animation_play_states.single_animation_play_states)

Expand Down
4 changes: 2 additions & 2 deletions build/styles/animation-range.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("animation-range")
property.set_text(Lang.EN, "animation-range")
property.set_text(Lang.FA, "وضعیت پخش انیمیشن")
property.add_text(Lang.EN, "animation-range")
property.add_text(Lang.FA, "وضعیت پخش انیمیشن")
property.set_type(Type.Strings)
property.add_reserve_values(single_animation_play_states.single_animation_play_states)

Expand Down
4 changes: 2 additions & 2 deletions build/styles/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
if __name__ == "__main__":
property = Property()
property.set_generate_name("display")
property.set_text(Lang.EN, "display")
property.set_text(Lang.FA, "نحوه نمایش")
property.add_text(Lang.EN, "display")
property.add_text(Lang.FA, "نحوه نمایش")
property.set_type(Type.String)
property.add_reserve_values([
Value().set_generate_name("none").add_text(Lang.EN, "none").add_text(Lang.FA, "هیچ"),
Expand Down
4 changes: 2 additions & 2 deletions build/tags/a.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
element = Element()
element.set_is_mother(True)
element.set_generate_name("a")
element.set_text(Lang.EN, "link")
element.set_text(Lang.FA, "لینک")
element.add_text(Lang.EN, "link")
element.add_text(Lang.FA, "لینک")

element.add_attribute() \
.set_generate_name("download") \
Expand Down
4 changes: 2 additions & 2 deletions build/tags/abbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
element = Element()
element.set_is_mother(True)
element.set_generate_name("abbr")
element.set_text(Lang.EN, "abbreviation")
element.set_text(Lang.FA, "مخفف")
element.add_text(Lang.EN, "abbreviation")
element.add_text(Lang.FA, "مخفف")

element.add_attribute() \
.set_generate_name("title") \
Expand Down
4 changes: 2 additions & 2 deletions build/tags/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
element = Element()
element.set_is_mother(True)
element.set_generate_name("address")
element.set_text(Lang.EN, "address")
element.set_text(Lang.FA, "آدرس")
element.add_text(Lang.EN, "address")
element.add_text(Lang.FA, "آدرس")

element_dict = element.to_dict()

Expand Down
4 changes: 2 additions & 2 deletions build/tags/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
element = Element()
element.set_is_mother(True)
element.set_generate_name("area")
element.set_text(Lang.EN, "area")
element.set_text(Lang.FA, "منطقه")
element.add_text(Lang.EN, "area")
element.add_text(Lang.FA, "منطقه")

element.add_attribute() \
.set_generate_name("alt") \
Expand Down
4 changes: 2 additions & 2 deletions build/tags/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
element = Element()
element.set_is_mother(True)
element.set_generate_name("article")
element.set_text(Lang.EN, "article")
element.set_text(Lang.FA, "مقاله")
element.add_text(Lang.EN, "article")
element.add_text(Lang.FA, "مقاله")

element_dict = element.to_dict()

Expand Down
4 changes: 2 additions & 2 deletions build/tags/aside.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
element = Element()
element.set_is_mother(True)
element.set_generate_name("aside")
element.set_text(Lang.EN, "aside")
element.set_text(Lang.FA, "کناره")
element.add_text(Lang.EN, "aside")
element.add_text(Lang.FA, "کناره")

element_dict = element.to_dict()

Expand Down
4 changes: 2 additions & 2 deletions build/tags/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
element = Element()
element.set_is_mother(True)
element.set_generate_name("audio")
element.set_text(Lang.EN, "audio")
element.set_text(Lang.FA, "صوت")
element.add_text(Lang.EN, "audio")
element.add_text(Lang.FA, "صوت")

element.add_attribute() \
.set_generate_name("autoplay") \
Expand Down
Loading

0 comments on commit 55aa4ba

Please sign in to comment.