design_tokens_test.tokens.yml

core/modules/system/tests/modules/design_tokens_test/design_tokens_test.tokens.yml

File

core/modules/system/tests/modules/design_tokens_test/design_tokens_test.tokens.yml

View source
  1. # @see \Drupal\KernelTests\Core\Theme\DesignToken\DesignTokenConfigEntityKernelTest
  2. {
  3. "color": {
  4. "palette": {
  5. "violet": {
  6. "$type": "color",
  7. "$value": "#7c3aed"
  8. },
  9. "rose": {
  10. "$type": "color",
  11. "$value": "#e11d48"
  12. }
  13. },
  14. "semantic": {
  15. "primary": {
  16. "$type": "color",
  17. "$value": "{color.palette.violet}"
  18. },
  19. "secondary": {
  20. "$type": "color",
  21. "$value": "{color.palette.rose}"
  22. }
  23. }
  24. },
  25. "fontSize": {
  26. "small": {
  27. "$type": "dimension",
  28. "$value": {
  29. "value": 12,
  30. "unit": "px"
  31. }
  32. },
  33. "medium": {
  34. "$type": "dimension",
  35. "$value": {
  36. "value": 16,
  37. "unit": "px"
  38. }
  39. },
  40. "large": {
  41. "$type": "dimension",
  42. "$value": {
  43. "value": 24,
  44. "unit": "px"
  45. }
  46. }
  47. },
  48. "font_family": {
  49. "Primary font": {
  50. "$value": "Comic Sans MS",
  51. "$type": "fontFamily"
  52. },
  53. "Body font": {
  54. "$value": ["Helvetica", "Arial", "sans-serif"],
  55. "$type": "fontFamily"
  56. }
  57. },
  58. "fontWeight": {
  59. "light": {
  60. "$type": "fontWeight",
  61. "$value": 300
  62. },
  63. "normal": {
  64. "$type": "fontWeight",
  65. "$value": "regular"
  66. },
  67. "bold": {
  68. "$type": "fontWeight",
  69. "$value": 600
  70. }
  71. },
  72. "spacing": {
  73. "small": {
  74. "$type": "dimension",
  75. "$value": {
  76. "value": 12,
  77. "unit": "px"
  78. }
  79. },
  80. "medium": {
  81. "$type": "dimension",
  82. "$value": {
  83. "value": 16,
  84. "unit": "px"
  85. }
  86. },
  87. "large": {
  88. "$type": "dimension",
  89. "$value": {
  90. "value": 20,
  91. "unit": "px"
  92. }
  93. }
  94. },
  95. "type styles": {
  96. "heading-level-1": {
  97. "$type": "typography",
  98. "$value": {
  99. "fontFamily": "Roboto",
  100. "fontSize": {
  101. "value": 42,
  102. "unit": "px"
  103. },
  104. "fontWeight": 700,
  105. "letterSpacing": {
  106. "value": 0.1,
  107. "unit": "px"
  108. },
  109. "lineHeight": 1.2
  110. }
  111. }
  112. }
  113. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.