76 | Back to top 77 | 100 | 101 |
102 |

Overview#

103 |

104 | Design tokens are a way of naming, defining, categorizing, and sharing values 105 | in a design system. Doing so helps us produce uniform user experiences across 106 | platforms and teams. Tokens are defined once using a standard syntax, and can be 107 | transformed by software into a variety of formats and helpers, for multiple platforms. 108 |

109 | 110 |

111 | An example token is 112 | --rh-color-brand-red-on-dark, 113 | the version of “Red Hat red” for use on dark backgrounds. 114 | It has the value #FF442B. 115 |

116 | 117 |

118 | Tokens are for designers and developers. They aid designers 119 | by limiting the pool of available style values to the brand standards and by 120 | standardizing their names and uses. They aid developers in making it 121 | easier to implement the designers’ specification by referencing well-defined token names. 122 |

123 | 124 |

125 | A designer might access the tokens in an XD template or via a figma plugin. 126 | We are researching the best way to make this available across teams and are eager for 127 | feedback. 128 |

129 | 130 |

131 | A developer might use them by referencing preloaded CSS custom properties, using 132 | SCSS variables, or by using editor snippets and lint rules to 133 | auto-complete variable names in CSS files. 134 |

135 | 136 |

137 | We want your feedback 138 | on our tokens! Are there missing values? Do you have an idea for an output format or tool 139 | integration? 140 |

141 | 142 |
143 | 144 |
145 | 146 |

Theme Tokens

147 |

Use theme tokens for best results.

148 |
149 | 150 |

Why, though?

151 |

That way, colours respond to their parents' color-palette 152 | Without requiring custom CSS

153 | Read More 154 |
155 |
156 | 157 | {% category path = 'color', 158 | exclude = ['border', 'text', 'icon'] %} 159 | {% category path = 'box-shadow' %} 160 | {% category path = 'font', 161 | include = ['line-height', 'color.text'] %} 162 | {% category path = 'border', 163 | include = 'color.border' %} 164 | {% category path = 'opacity' %} 165 | {% category path = 'space' %} 166 | {% category path = 'length' %} 167 | {% category path = 'size.icon', 168 | name = 'icon', 169 | include = 'color.icon' %} 170 | {% category path = 'breakpoint' %} 171 | {% category path = 'media' %} 172 | 173 | 174 |