diff --git a/components/style/list_properties.py b/components/style/list_properties.py index 63bbe2475118..671196167c97 100644 --- a/components/style/list_properties.py +++ b/components/style/list_properties.py @@ -21,4 +21,17 @@ }) for p in template.module.LONGHANDS + template.module.SHORTHANDS ) -print(json.dumps(properties, indent=4)) + +json_dump = json.dumps(properties, indent=4) + +# +# Resolve path to doc directory and write CSS properties and JSON. +# +servo_doc_path = os.path.abspath(os.path.join(style, '../', '../', 'target', 'doc', 'servo')) + +with open(os.path.join(servo_doc_path, 'css-properties.json'), "w") as out_file: + out_file.write(json_dump) + +html_template = Template(filename=os.path.join(style, "properties.html.mako"), input_encoding='utf8') +with open(os.path.join(servo_doc_path, 'css-properties.html'), "w") as out_file: + out_file.write(html_template.render(properties=properties)) diff --git a/components/style/properties.html.mako b/components/style/properties.html.mako new file mode 100644 index 000000000000..4785415a0f43 --- /dev/null +++ b/components/style/properties.html.mako @@ -0,0 +1,67 @@ + + + + + + + + + Supported CSS properties - servo - Rust + + + + + +
+

CSS properties currently supported in Servo

+
+ Loading +
+
+ + + + + diff --git a/etc/ci/upload_docs.sh b/etc/ci/upload_docs.sh index 240b20d77628..2aea0fcea009 100755 --- a/etc/ci/upload_docs.sh +++ b/etc/ci/upload_docs.sh @@ -12,5 +12,7 @@ cd "$(dirname $0)/../.." # etc/doc.servo.org/index.html overwrites $(mach rust-root)/doc/index.html cp etc/doc.servo.org/* target/doc/ +python components/style/list_properties.py + ghp-import -n target/doc git push -qf https://${TOKEN}@github.com/servo/doc.servo.org.git gh-pages