# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/.
import json import os.path import re import sys
BASE = os.path.dirname(__file__.replace("\\", "/"))
sys.path.insert(0, BASE) # For importing `data.py`
from mako import exceptions from mako.lookup import TemplateLookup from mako.template import Template
import data
RE_PYTHON_ADDR = re.compile(r"<.+? object at 0x[0-9a-fA-F]+>")
properties_dict = {
kind: {
p.name: {"pref": getattr(p, "servo_pref")} for prop in properties_list if prop.enabled_in_content() for p in [prop] + prop.aliases
} for kind, properties_list in [
("longhands", properties.longhands),
("shorthands", properties.shorthands),
]
}
as_html = render(
os.path.join(BASE, "properties.html.mako"), properties=properties_dict
)
as_json = json.dumps(properties_dict, indent=4, sort_keys=True)
# Four dotdots: /path/to/target(4)/debug(3)/build(2)/style-*(1)/out # Do not ascend above the target dir, because it may not be called target # or even have a parent (see CARGO_TARGET_DIR).
doc_servo = os.path.join(OUT_DIR, "..", "..", "..", "..", "doc", "stylo")
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.