{"id":17058377,"url":"https://github.com/garthdb/design-token-attributes","last_synced_at":"2026-05-02T09:35:37.733Z","repository":{"id":186198808,"uuid":"673087102","full_name":"GarthDB/design-token-attributes","owner":"GarthDB","description":"A mono repo for managing design token contexts","archived":false,"fork":false,"pushed_at":"2024-02-29T20:32:13.000Z","size":69,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T09:57:54.827Z","etag":null,"topics":["design-system","monorepo","postcss","styledictionary","stylelint"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GarthDB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-07-31T20:59:07.000Z","updated_at":"2023-08-04T20:52:08.000Z","dependencies_parsed_at":"2024-01-11T01:33:04.908Z","dependency_job_id":"a2b2bdbd-e026-4aa3-a245-c4d1557977be","html_url":"https://github.com/GarthDB/design-token-attributes","commit_stats":null,"previous_names":["garthdb/design-token-attributes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarthDB%2Fdesign-token-attributes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarthDB%2Fdesign-token-attributes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarthDB%2Fdesign-token-attributes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarthDB%2Fdesign-token-attributes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GarthDB","download_url":"https://codeload.github.com/GarthDB/design-token-attributes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245067208,"owners_count":20555522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["design-system","monorepo","postcss","styledictionary","stylelint"],"created_at":"2024-10-14T10:29:30.460Z","updated_at":"2026-05-02T09:35:37.690Z","avatar_url":"https://github.com/GarthDB.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Design Token Attributes\n\nA monorepo of tools to manage attributes and metadata for design tokens.\n\n## The problem Design Token Attributes aims to solve\n\nAt Adobe, our [design token](https://www.designtokens.org/glossary/#design-token) management system ([Spectrum Tokens](https://github.com/adobe/spectrum-tokens)) can contain meta data like flagging `deprecated` data, but that meta data is not translated to the different implementations like CSS custom properties.\n\nAs a real example, in the token system, design data could look like this (this is a simplified example of renamed token):\n\n```json\n{\n  \"background-color-hover\": {\n    \"value\": \"rgb(213, 213, 213)\"\n  },\n  \"hover-background-color\": {\n    \"value\": \"{background-color-hover}\",\n    \"deprecated\": true,\n    \"deprecated_comment\": \"this value is no longer supported, use `background-color-hover`\"\n  }\n}\n```\n\nWhen this gets converted to CSS custom properties we would lose that metadata:\n\n```css\n:root {\n  --background-color-hover: rgb(213, 213, 213);\n  --hover-background-color: var(--background-color-hover);\n}\n```\n\nBecause the deprecated metadata is lost, any product/project relying on these custom properties wouldn't easily know they should update from the old property name to the new one.\n\n## Proposed solution: Design Token Attributes\n\nTo help keep the context of this data, we are considering adding context comments similar to [SassDoc](http://sassdoc.com/annotations/#deprecated).\n\nThe same data above could be better represented as this:\n\n```css\n:root {\n  --background-color-hover: rgb(213, 213, 213);\n  /* @deprecated */\n  --hover-background-color: var(--background-color-hover);\n}\n```\n\nThis could then be parsed using a PostCSS plugin [postcss-attributes](packages/postcss-attributes/) which gathers the definitions with attribute comments in a format that could be used by other PostCSS plugins or a Stylelint plugin [stylelint-attributes](packages/stylelint-attributes/).\n\n## Plans\n\nThis is an early proof of concept. If it turns out to be useful, I will work on turning it into a more complete solution with full documentation on supported attributes that can be added to CSS custom property definitions and maybe CSS classes?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarthdb%2Fdesign-token-attributes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarthdb%2Fdesign-token-attributes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarthdb%2Fdesign-token-attributes/lists"}