-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Skeleton Plugin refactor #1660
feat: Skeleton Plugin refactor #1660
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@AdrianGonz97 sorry I missed you comment a few days go. GitHub keeps notifying me of updates to the PR, but just links me to the list of file changes!
I think we mentioned this in our prior discussion, but really the "extras" needs to go away and those need to become standardized but optional CSS custom properties that are part of the theme. Perhaps we even document how to extend the theme with unique properties. The idea being that we want folks to buy into the design token approach, rather than circumvent or duplicate effort. I don't know exactly how this will look in execution, so I'll have to tinker with it a bit when we start the theme generator updates. I'm thinking order of operations look like this:
The end result is what is shipped in v2 |
@endigo9740 Alright, that sounds good. In that case, I think this PR is practically ready to be merged. The only remaining task would be to update our manual install documentation and add a section explaining how the plugin works, customization, etc. |
@AdrianGonz97 I agreed, we definitely need to get that doc page started. A couple other things:
Per what's remaining:
|
Migration Guide
1. Install the new plugin:
2. Update your
tailwind.config.[js,cjs,ts]
:tailwind.config.cjs
tailwind.config.js
tailwind.config.ts
3. Add your theme:
Next, we'll need to pass your previous theme to the plugin.
Note: Previously known as "Extras", "Enhancements" provided additional settings such as background gradients, header font weights, and more. Previously, they were enabled when
data-theme
was set to the name of your theme on thebody
tag inapp.html
.Preset theme without any enhancements
Preset theme with enhancements
Custom theme
If you have made your own custom theme, here's a quick guide on how to convert it into a compatible format:
Visit https://transform.tools/css-to-js
Copy the contents of your theme's
:root
selector and paste them into the CSS field on the site.Copy the converted property values. (note: don't copy the wrapping

converted
object, but instead, only copy the values defined within the object).Paste the converted properties into the
properties
field (shown below).Keep in mind that this is still Javascript, so you are free to define the theme properties in a sperate file, export it as an object, and import it into your
tailwind.config.[cjs|js|ts]
as a module (if you wish to keep your tailwind config as minimal as possible).4. Add your theme's name to your
src/app.html
:We'll need to add the name of your theme to the
data-theme
attribute on thebody
tag. Themes can easily be switched by changing the value of this attribute.5. Add tailwind directives to
src/app.postcss
:6. Remove stylesheet imports from your root
+layout.svelte
:Description
Closes #1286
This is a complete overhaul of our skeleton plugin. The plugin has been extracted out into it's own package. Users will now only have to import our plugin instead of having to add all of our stylesheets (woohoo!).
Stylesheets have also been grouped by their respective layers,
base
orcomponents
. This needed to be done for the sake of adding the base styles and component classes separately to the plugin.TODO
.css
files to auto-build the plugin when those files are modifiedprefix
config option so that users can prefix our provided classes to prevent conflicts from other pluginsAdditional Notes
For some reason, tailwind...It works now for some reason.3.3.2
breaks our gradients for variants. The plugin will stick with3.3.1
for the time being. See this deployment..css
and.postcss
files now.Checklist
Please read and apply all contribution requirements.
dev
branch (NEVERmaster
)docs/
,feat/
,chore/
,bugfix/
pnpm check
pnpm format
pnpm test