Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added optional dark mode theme properties #1896

Merged
merged 3 commits into from
Aug 17, 2023
Merged

Conversation

AdrianGonz97
Copy link
Member

@AdrianGonz97 AdrianGonz97 commented Aug 17, 2023

Linked Issue

Closes #1893

Description

Added optional dark mode specific properties for themes.

These properties can be added via the optional properties_dark prop for custom themes.

Ex:

import type { CustomThemeConfig } from '@skeletonlabs/tw-plugin';

export const customTheme = {
	name: "my-custom-theme",
    // base
    properties: {
        '--color-primary-50': '219 245 236',
        '--color-primary-100': '207 241 230',
        '--color-primary-200': '195 238 224',
		// ...
    },
    // applies on dark theme only (optional)
    properties_dark: {
        '--color-primary-50': '219 245 236',
        '--color-primary-100': '207 241 230',
        '--color-primary-200': '195 238 224',
    }
} satisfies CustomThemeConfig;

Changsets

Instructions: Changesets automate our changelog. If you modify files in /packages/skeleton, run pnpm changeset in the root of the monorepo, follow the prompts, then commit the markdown file. Changes that add features should be minor while chores and bugfixes should be patch. Please prefix the changeset message with feat:, bugfix: or chore:.

Checklist

Please read and apply all contribution requirements.

  • This PR targets the dev branch (NEVER master)
  • Documentation reflects all relevant changes
  • Branch is prefixed with: docs/, feat/, chore/, bugfix/
  • Ensure Svelte and Typescript linting is current - run pnpm check
  • Ensure Prettier linting is current - run pnpm format
  • All test cases are passing - run pnpm test
  • Includes a changeset (if relevant; see above)

@changeset-bot
Copy link

changeset-bot bot commented Aug 17, 2023

🦋 Changeset detected

Latest commit: 6ce5efa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@skeletonlabs/tw-plugin Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Aug 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
skeleton-docs ✅ Ready (Inspect) Visit Preview Aug 17, 2023 8:25pm

@endigo9740
Copy link
Contributor

endigo9740 commented Aug 17, 2023

@AdrianGonz97 looks like a simple enough change that works well enough. Feel free to merge.

@AdrianGonz97 AdrianGonz97 merged commit 2af537b into v2 Aug 17, 2023
@endigo9740 endigo9740 deleted the feat/dark-properties branch August 17, 2023 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants