File size: 2,109 Bytes
0ad74ed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
from __future__ import annotations
class Size:
all = []
def __init__(
self, xxs: str, xs: str, sm: str, md: str, lg: str, xl: str, xxl: str, name=None
):
self.xxs = xxs
self.xs = xs
self.sm = sm
self.md = md
self.lg = lg
self.xl = xl
self.xxl = xxl
self.name = name
Size.all.append(self)
def expand(self) -> list[str]:
return [self.xxs, self.xs, self.sm, self.md, self.lg, self.xl, self.xxl]
radius_none = Size(
name="radius_none",
xxs="0px",
xs="0px",
sm="0px",
md="0px",
lg="0px",
xl="0px",
xxl="0px",
)
radius_sm = Size(
name="radius_sm",
xxs="1px",
xs="1px",
sm="2px",
md="4px",
lg="6px",
xl="8px",
xxl="12px",
)
radius_md = Size(
name="radius_md",
xxs="1px",
xs="2px",
sm="4px",
md="6px",
lg="8px",
xl="12px",
xxl="22px",
)
radius_lg = Size(
name="radius_lg",
xxs="2px",
xs="4px",
sm="6px",
md="8px",
lg="12px",
xl="16px",
xxl="24px",
)
radius_xxl = Size(
xxs="6px",
xs="8px",
sm="10px",
md="20px",
lg="24px",
xl="28px",
xxl="32px",
name="radius_xxl",
)
spacing_sm = Size(
name="spacing_sm",
xxs="1px",
xs="1px",
sm="2px",
md="4px",
lg="6px",
xl="9px",
xxl="12px",
)
spacing_md = Size(
name="spacing_md",
xxs="1px",
xs="2px",
sm="4px",
md="6px",
lg="8px",
xl="10px",
xxl="16px",
)
spacing_lg = Size(
name="spacing_lg",
xxs="2px",
xs="4px",
sm="6px",
md="8px",
lg="10px",
xl="14px",
xxl="28px",
)
text_sm = Size(
name="text_sm",
xxs="8px",
xs="9px",
sm="11px",
md="13px",
lg="16px",
xl="20px",
xxl="24px",
)
text_md = Size(
name="text_md",
xxs="9px",
xs="10px",
sm="12px",
md="14px",
lg="16px",
xl="22px",
xxl="26px",
)
text_lg = Size(
name="text_lg",
xxs="10px",
xs="12px",
sm="14px",
md="16px",
lg="20px",
xl="24px",
xxl="28px",
)
|