tree: 73c218d07b3aeae640177c694f9792a72c4c427e [path history] [tgz]
  1. .style.yapf
  2. __init__.py
  3. additional_colors_test.json5
  4. base_generator.py
  5. base_generator_test.py
  6. color.py
  7. color_test.py
  8. colors_test.json5
  9. colors_test_dark_only_expected.css
  10. colors_test_expected.css
  11. colors_test_expected.h
  12. colors_test_expected.proto
  13. colors_test_expected.protojson
  14. colors_test_palette.json5
  15. css_generator.py
  16. css_generator.tmpl
  17. DEPS
  18. find_invalid_css_variables.py
  19. find_invalid_css_variables_test.py
  20. OWNERS
  21. path_overrides.py
  22. PRESUBMIT.py
  23. presubmit_support.py
  24. proto_generator.py
  25. proto_generator.tmpl
  26. proto_json_generator.tmpl
  27. README.md
  28. style_variable_generator.gni
  29. style_variable_generator.py
  30. style_variable_generator_test.py
  31. views_generator.py
  32. views_generator_h.tmpl
tools/style_variable_generator/README.md

style_variable_generator

This is a python tool that generates cross-platform style variables in order to centralize UI constants.

This script uses third_party/pyjson5 to read input json5 files and then generates various output formats as needed by clients (e.g CSS Variables, preview HTML page).

For input format examples, see the *_test.json5 files which contain up to date illustrations of each feature, as well as expected outputs in the corresponding *_test_expected.* files.

Run python style_variable_generator.py -h for usage details.