{"id":26577794,"url":"https://github.com/logan-larson/tailwind-light-dark","last_synced_at":"2025-03-23T04:01:37.148Z","repository":{"id":282406971,"uuid":"948199140","full_name":"logan-larson/tailwind-light-dark","owner":"logan-larson","description":"A Tailwind CSS plugin that generates shorthand utilities for light and dark mode color pairs","archived":false,"fork":false,"pushed_at":"2025-03-14T13:31:55.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T13:34:29.184Z","etag":null,"topics":["dark-mode","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/logan-larson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null}},"created_at":"2025-03-13T23:12:28.000Z","updated_at":"2025-03-14T13:31:59.000Z","dependencies_parsed_at":"2025-03-14T13:34:33.116Z","dependency_job_id":"472ee5bf-0cc6-4099-8f13-7bb0c001e55d","html_url":"https://github.com/logan-larson/tailwind-light-dark","commit_stats":null,"previous_names":["logan-larson/tailwind-light-dark"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logan-larson%2Ftailwind-light-dark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logan-larson%2Ftailwind-light-dark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logan-larson%2Ftailwind-light-dark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logan-larson%2Ftailwind-light-dark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logan-larson","download_url":"https://codeload.github.com/logan-larson/tailwind-light-dark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052664,"owners_count":20553171,"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":["dark-mode","tailwindcss"],"created_at":"2025-03-23T04:01:22.688Z","updated_at":"2025-03-23T04:01:37.131Z","avatar_url":"https://github.com/logan-larson.png","language":"JavaScript","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/dcastil/tailwind-merge\"\u003e\n        \u003cimg src=\"./tailwind-light-dark-logo.svg\" alt=\"tailwind-light-dark\" height=\"150px\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n# Tailwind Light-Dark Plugin\n\nA Tailwind CSS plugin that generates shorthand utilities for light and dark mode color pairs.\n\n## Installation\n\n```bash\nnpm install tailwind-light-dark\n# or\nyarn add tailwind-light-dark\n```\n\n## Usage\n\n### Tailwind CSS v4\n\nAdd the plugin to your `app.css` or `app.postcss` file:\n\n```css\n@import \"tailwindcss\";\n\n@plugin 'tailwind-light-dark';\n\n/* Required: Make dark mode class based */\n@custom-variant dark (\u0026:where(.dark, .dark *));\n\n/* ... */\n```\n\n### Tailwind CSS v3\n\nAdd the plugin to your `tailwind.config.js` file:\n\n```js\n// tailwind.config.js\nmodule.exports = {\n  darkMode: 'class', // This is required\n  // ...\n  plugins: [\n    require('tailwind-light-dark'),\n    // ...\n  ],\n}\n```\n\nThen use the generated utilities in your HTML:\n\n```html\n\u003c!-- Background colors --\u003e\n\u003cdiv class=\"bg-red-200-700\"\u003e\n  \u003c!-- This will be red-200 in light mode and red-700 in dark mode --\u003e\n\u003c/div\u003e\n\n\u003c!-- Text colors --\u003e\n\u003cdiv class=\"text-blue-300-900\"\u003e\n  \u003c!-- This will be blue-300 in light mode and blue-900 in dark mode --\u003e\n\u003c/div\u003e\n\n\u003c!-- White/black shortcuts --\u003e\n\u003cdiv class=\"bg-white-black text-black-white\"\u003e\n  \u003c!-- White background with black text in light mode --\u003e\n  \u003c!-- Black background with white text in dark mode --\u003e\n\u003c/div\u003e\n```\n\n## Available Utilities\n\nThis plugin generates the following utility types:\n\n- `bg-{color}-{lightShade}-{darkShade}` - Background colors\n- `text-{color}-{lightShade}-{darkShade}` - Text colors\n- `border-{color}-{lightShade}-{darkShade}` - Border colors\n- `decoration-{color}-{lightShade}-{darkShade}` - Text decoration colors\n- `outline-{color}-{lightShade}-{darkShade}` - Outline colors\n- `shadow-{color}-{lightShade}-{darkShade}` - Box shadow colors\n- `inset-shadow-{color}-{lightShade}-{darkShade}` - Inset box shadow colors\n- `ring-{color}-{lightShade}-{darkShade}` - Ring shadow colors\n- `inset-ring-{color}-{lightShade}-{darkShade}` - Inset ring shadow colors\n- `accent-{color}-{lightShade}-{darkShade}` - Accent colors\n- `caret-{color}-{lightShade}-{darkShade}` - Caret colors\n- `fill-{color}-{lightShade}-{darkShade}` - SVG fill colors\n- `stroke-{color}-{lightShade}-{darkShade}` - SVG stroke colors\n- `from-{color}-{lightShade}-{darkShade}` - Gradient from colors\n- `to-{color}-{lightShade}-{darkShade}` - Gradient to colors\n\n## Special Utilities\n\nThe plugin also provides convenient white/black pairs:\n\n- `bg-white-black` / `bg-black-white`\n- `text-white-black` / `text-black-white`\n- `border-white-black` / `border-black-white`\n- `fill-white-black` / `fill-black-white`\n- `stroke-white-black` / `stroke-black-white`\n- `from-white-black` / `from-black-white`\n- `to-white-black` / `to-black-white`\n\n## License\n\nMIT\n\n## Inspiration\n\nThis plugin was heavily inspired by [SkeletonUI](https://www.skeleton.dev/). They provide light-dark color pairings for their own themed colors (e.g. primary-100-900, secondary-600-400, surface-950-50, etc.) and I wanted light-dark pairings available for every tailwind color.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogan-larson%2Ftailwind-light-dark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogan-larson%2Ftailwind-light-dark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogan-larson%2Ftailwind-light-dark/lists"}