-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
460 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
parent_dir = Path(__file__).resolve().parent.parent | ||
sys.path.append(str(parent_dir)) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles")) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles", "values")) | ||
|
||
from prebuild import Prebuild | ||
|
||
from lang import Lang | ||
from type import Type | ||
from value import Value | ||
from property import Property | ||
|
||
if __name__ == "__main__": | ||
property = Property() | ||
property.set_generate_name("aspect-ratio") | ||
property.add_text(Lang.EN, "aspect-ratio") | ||
property.add_text(Lang.FA, "نسبت ابعاد") | ||
property.set_type(Type.NUMBER_OR_2NUMBERS) | ||
property.add_reserve_values( | ||
[ | ||
Value().set_generate_name("auto").add_text(Lang.EN, "auto").add_text(Lang.FA, "خودکار"), | ||
] | ||
) | ||
|
||
property_dict = property.to_dict() | ||
|
||
property_str = Prebuild.to_string(property_dict) | ||
Prebuild.print(property_str) | ||
Prebuild.save(property_str, __file__) | ||
|
||
# https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio | ||
# aspect-ratio = | ||
# auto || | ||
# <ratio> | ||
|
||
# <ratio> = | ||
# <number [0,∞]> [ / <number [0,∞]> ]? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
parent_dir = Path(__file__).resolve().parent.parent | ||
sys.path.append(str(parent_dir)) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles")) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles", "values")) | ||
|
||
from prebuild import Prebuild | ||
|
||
from lang import Lang | ||
from type import Type | ||
from value import Value | ||
from property import Property | ||
|
||
if __name__ == "__main__": | ||
property = Property() | ||
property.set_generate_name("aspect-ratio") | ||
property.add_text(Lang.EN, "aspect-ratio") | ||
property.add_text(Lang.FA, "نسبت ابعاد") | ||
property.set_type(Type.NUMBER_OR_2NUMBERS) | ||
property.add_reserve_values( | ||
[ | ||
Value().set_generate_name("auto").add_text(Lang.EN, "auto").add_text(Lang.FA, "خودکار"), | ||
] | ||
) | ||
|
||
property_dict = property.to_dict() | ||
|
||
property_str = Prebuild.to_string(property_dict) | ||
Prebuild.print(property_str) | ||
Prebuild.save(property_str, __file__) | ||
|
||
# https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio | ||
# aspect-ratio = | ||
# auto || | ||
# <ratio> | ||
|
||
# <ratio> = | ||
# <number [0,∞]> [ / <number [0,∞]> ]? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
parent_dir = Path(__file__).resolve().parent.parent | ||
sys.path.append(str(parent_dir)) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles")) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles", "values")) | ||
|
||
from prebuild import Prebuild | ||
|
||
from lang import Lang | ||
from type import Type | ||
from value import Value | ||
from property import Property | ||
|
||
if __name__ == "__main__": | ||
property = Property() | ||
property.set_generate_name("backdrop-filter") | ||
property.add_text(Lang.EN, "backdrop-filter") | ||
property.add_text(Lang.FA, "فیلتر پسزمینه") | ||
property.set_type(Type.NUMBER_OR_2NUMBERS) | ||
property.add_reserve_values( | ||
[ | ||
Value().set_generate_name("auto").add_text(Lang.EN, "auto").add_text(Lang.FA, "خودکار"), | ||
] | ||
) | ||
|
||
property_dict = property.to_dict() | ||
|
||
property_str = Prebuild.to_string(property_dict) | ||
Prebuild.print(property_str) | ||
Prebuild.save(property_str, __file__) | ||
|
||
# https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter | ||
# backdrop-filter = | ||
# none | | ||
# <filter-value-list> | ||
|
||
# <filter-value-list> = | ||
# [ <filter-function> | <url> ]+ | ||
|
||
# <filter-function> = | ||
# <blur()> | | ||
# <brightness()> | | ||
# <contrast()> | | ||
# <drop-shadow()> | | ||
# <grayscale()> | | ||
# <hue-rotate()> | | ||
# <invert()> | | ||
# <opacity()> | | ||
# <sepia()> | | ||
# <saturate()> | ||
|
||
# <url> = | ||
# <url()> | | ||
# <src()> | ||
|
||
# <blur()> = | ||
# blur( <length>? ) | ||
|
||
# <brightness()> = | ||
# brightness( [ <number> | <percentage> ]? ) | ||
|
||
# <contrast()> = | ||
# contrast( [ <number> | <percentage> ]? ) | ||
|
||
# <drop-shadow()> = | ||
# drop-shadow( [ <color>? && <length>{2,3} ] ) | ||
|
||
# <grayscale()> = | ||
# grayscale( [ <number> | <percentage> ]? ) | ||
|
||
# <hue-rotate()> = | ||
# hue-rotate( [ <angle> | <zero> ]? ) | ||
|
||
# <invert()> = | ||
# invert( [ <number> | <percentage> ]? ) | ||
|
||
# <opacity()> = | ||
# opacity( [ <number> | <percentage> ]? ) | ||
|
||
# <sepia()> = | ||
# sepia( [ <number> | <percentage> ]? ) | ||
|
||
# <saturate()> = | ||
# saturate( [ <number> | <percentage> ]? ) | ||
|
||
# <url()> = | ||
# url( <string> <url-modifier>* ) | | ||
# <url-token> | ||
|
||
# <src()> = | ||
# src( <string> <url-modifier>* ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
parent_dir = Path(__file__).resolve().parent.parent | ||
sys.path.append(str(parent_dir)) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles")) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles", "values")) | ||
|
||
from prebuild import Prebuild | ||
|
||
from lang import Lang | ||
from type import Type | ||
from value import Value | ||
from property import Property | ||
|
||
if __name__ == "__main__": | ||
property = Property() | ||
property.set_generate_name("backface-visibility") | ||
property.add_text(Lang.EN, "backface-visibility") | ||
property.add_text(Lang.FA, "قابلیت دید پشتی") | ||
property.set_type(Type.String) | ||
|
||
property_dict = property.to_dict() | ||
|
||
property_str = Prebuild.to_string(property_dict) | ||
Prebuild.print(property_str) | ||
Prebuild.save(property_str, __file__) | ||
|
||
# https://developer.mozilla.org/en-US/docs/Web/CSS/block-size | ||
# block-size = | ||
# <'width'> | ||
|
||
# <width> = | ||
# auto | | ||
# <length-percentage [0,∞]> | | ||
# min-content | | ||
# max-content | | ||
# fit-content( <length-percentage [0,∞]> ) | | ||
# <calc-size()> | | ||
# <anchor-size()> | ||
|
||
# <length-percentage> = | ||
# <length> | | ||
# <percentage> | ||
|
||
# <calc-size()> = | ||
# calc-size( <calc-size-basis> , <calc-sum> ) | ||
|
||
# <anchor-size()> = | ||
# anchor-size( [ <anchor-name> || <anchor-size> ]? , <length-percentage>? ) | ||
|
||
# <calc-size-basis> = | ||
# <intrinsic-size-keyword> | | ||
# <calc-size()> | | ||
# any | | ||
# <calc-sum> | ||
|
||
# <calc-sum> = | ||
# <calc-product> [ [ '+' | '-' ] <calc-product> ]* | ||
|
||
# <anchor-name> = | ||
# <dashed-ident> | ||
|
||
# <anchor-size> = | ||
# width | | ||
# height | | ||
# block | | ||
# inline | | ||
# self-block | | ||
# self-inline | ||
|
||
# <calc-product> = | ||
# <calc-value> [ [ '*' | '/' ] <calc-value> ]* | ||
|
||
# <calc-value> = | ||
# <number> | | ||
# <dimension> | | ||
# <percentage> | | ||
# <calc-keyword> | | ||
# ( <calc-sum> ) | ||
|
||
# <calc-keyword> = | ||
# e | | ||
# pi | | ||
# infinity | | ||
# -infinity | | ||
# NaN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
parent_dir = Path(__file__).resolve().parent.parent | ||
sys.path.append(str(parent_dir)) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles")) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles", "values")) | ||
|
||
from prebuild import Prebuild | ||
|
||
from lang import Lang | ||
from type import Type | ||
from value import Value | ||
from values import Values | ||
from property import Property | ||
|
||
if __name__ == "__main__": | ||
property = Property() | ||
property.set_generate_name("background-position-y") | ||
property.add_text(Lang.EN, "background-position-y") | ||
property.add_text(Lang.FA, | ||
property.set_type(Type.SIZE) | ||
|
||
values = [ | ||
Value().set_generate_name("repeat").add_text(Lang.EN, "repeat").add_text(Lang.FA, "تکرار"), | ||
Value().set_generate_name("space").add_text(Lang.EN, "space").add_text(Lang.FA, "فضا"), | ||
Value().set_generate_name("round").add_text(Lang.EN, "round").add_text(Lang.FA, "گرد"), | ||
Value().set_generate_name("no-repeat").add_text(Lang.EN, "no-repeat").add_text(Lang.FA, "بدون تکرار"), | ||
] | ||
property.add_reserve_values( | ||
[ | ||
Value().set_generate_name("repeat-x").add_text(Lang.EN, "repeat-x").add_text(Lang.FA, "تکرار افقی"), | ||
Value().set_generate_name("repeat-y").add_text(Lang.EN, "repeat-y").add_text(Lang.FA, "تکرار عمودی"), | ||
] | ||
) | ||
property.add_values(values) | ||
property.add_reserve_values(Values.And(values, values)) | ||
|
||
property_dict = property.to_dict() | ||
|
||
property_str = Prebuild.to_string(property_dict) | ||
Prebuild.print(property_str) | ||
Prebuild.save(property_str, __file__) | ||
|
||
# https://developer.mozilla.org/en-US/docs/Web/CSS/background-position-y | ||
# background-position-y = | ||
# [ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]# | ||
|
||
# <length-percentage> = | ||
# <length> | | ||
# <percentage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
parent_dir = Path(__file__).resolve().parent.parent | ||
sys.path.append(str(parent_dir)) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles")) | ||
sys.path.append(os.path.join(parent_dir, "data", "styles", "values")) | ||
|
||
from prebuild import Prebuild | ||
|
||
from lang import Lang | ||
from type import Type | ||
from value import Value | ||
from values import Values | ||
from property import Property | ||
|
||
if __name__ == "__main__": | ||
property = Property() | ||
property.set_generate_name("background-repeat") | ||
property.add_text(Lang.EN, "background-repeat") | ||
property.add_text(Lang.FA, "تکرار پس زمینه") | ||
property.set_type(Type.SIZE) | ||
|
||
values = [ | ||
Value().set_generate_name("repeat").add_text(Lang.EN, "repeat").add_text(Lang.FA, "تکرار"), | ||
Value().set_generate_name("space").add_text(Lang.EN, "space").add_text(Lang.FA, "فضا"), | ||
Value().set_generate_name("round").add_text(Lang.EN, "round").add_text(Lang.FA, "گرد"), | ||
Value().set_generate_name("no-repeat").add_text(Lang.EN, "no-repeat").add_text(Lang.FA, "بدون تکرار"), | ||
] | ||
property.add_reserve_values( | ||
[ | ||
Value().set_generate_name("repeat-x").add_text(Lang.EN, "repeat-x").add_text(Lang.FA, "تکرار افقی"), | ||
Value().set_generate_name("repeat-y").add_text(Lang.EN, "repeat-y").add_text(Lang.FA, "تکرار عمودی"), | ||
] | ||
) | ||
property.add_values(values) | ||
property.add_reserve_values(Values.And(values, values)) | ||
|
||
property_dict = property.to_dict() | ||
|
||
property_str = Prebuild.to_string(property_dict) | ||
Prebuild.print(property_str) | ||
Prebuild.save(property_str, __file__) | ||
|
||
# https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat | ||
# background-repeat = | ||
# <repeat-style># | ||
|
||
# <repeat-style> = | ||
# repeat-x | | ||
# repeat-y | | ||
# [ repeat | space | round | no-repeat ]{1,2} |
Oops, something went wrong.