mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
stylo: System font support for keyword font longhands
This commit is contained in:
parent
2c5ac9fc2d
commit
5b06a32032
7 changed files with 193 additions and 75 deletions
|
@ -13,6 +13,9 @@ LOGICAL_SIZES = ["block-size", "inline-size"]
|
|||
ALL_SIDES = [(side, False) for side in PHYSICAL_SIDES] + [(side, True) for side in LOGICAL_SIDES]
|
||||
ALL_SIZES = [(size, False) for size in PHYSICAL_SIZES] + [(size, True) for size in LOGICAL_SIZES]
|
||||
|
||||
SYSTEM_FONT_LONGHANDS = """font_family font_size font_style
|
||||
font_variant_caps font_stretch font_kerning
|
||||
font_variant_position""".split()
|
||||
|
||||
def maybe_moz_logical_alias(product, side, prop):
|
||||
if product == "gecko" and side[1]:
|
||||
|
@ -32,6 +35,10 @@ def to_rust_ident(name):
|
|||
def to_camel_case(ident):
|
||||
return re.sub("(^|_|-)([a-z])", lambda m: m.group(2).upper(), ident.strip("_").strip("-"))
|
||||
|
||||
def to_camel_case_lower(ident):
|
||||
camel = to_camel_case(ident)
|
||||
return camel[0].lower() + camel[1:]
|
||||
|
||||
|
||||
def parse_aliases(value):
|
||||
aliases = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue