-
-
Notifications
You must be signed in to change notification settings - Fork 40
Add skeleton-5.css #888
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
Open
MrVauxs
wants to merge
4
commits into
techniq:main
Choose a base branch
from
MrVauxs:skeleton-5
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+25
−0
Open
Add skeleton-5.css #888
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'layerchart': patch | ||
| --- | ||
|
|
||
| Added skeleton-5.css |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| @import './core.css'; | ||
|
|
||
| .lc-root-container { | ||
| --color-primary: var(--color-primary-500); | ||
|
|
||
| --color-surface-100: var(--color-surface-50-950); | ||
| --color-surface-200: var(--color-surface-100); | ||
| --color-surface-300: var(--color-surface-200); | ||
| --color-surface-content: light-dark( | ||
| var(--typo-base--color-light), | ||
| var(--typo-base--color-dark) | ||
| ); | ||
|
|
||
| html.dark & { | ||
| --color-surface-100: var(--color-surface-700); | ||
| --color-surface-200: var(--color-surface-800); | ||
| --color-surface-300: var(--color-surface-900); | ||
| --color-surface-content: var(--typo-base--color-dark); | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haven't typically used
light-dark()for light/default color and typically just set to light mode by default.shouldn't technically matter and has descent browser support (2 years+, Safari 17.5+)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that Tailwind uses prefers-color-scheme by default which makes picking one break the other. And Skeleton 5 does not have one variable for
coloranymore, it has to be explicitly light or dark.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think Skeleton hasn't had a single variable for color since at least 3.x (the main reason we use
html.darkto swap variables, unlike the other integrations like shadcn-svelte, daisy-ui, etc which are much simplier).Using
light-dark()will make fontcolorwork, but in that vein we'd probably want to do the same for the surface colors (as if you're not using<html class="dark">you could get--typo-base--color-darkfor text in dark mode but also the lightsurface-*colors.https://www.skeleton.dev/docs/svelte/guides/mode
Will take a little experimentation to make sure
prefers-color-schemeandhtml.darkworks if we go down this path. I've always preferred usinghtml.darksince typically a user with light/dark modes for their site also have an explicit toggle (see also: https://www.skeleton.dev/docs/svelte/guides/cookbook/light-switch).Regardless, we can iterate on this. Also the integration styles (skeleton-5.css, etc) are provided to streamline setup but also are more a reference if you handle things differently (such as using another strategy like
<html data-mode="dark">)