-
Notifications
You must be signed in to change notification settings - Fork 85
docs(theming): add theming reference to tutorialkit.dev #97
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
Conversation
|
|
Deploying tutorialkit-docs-page with
|
Latest commit: |
8e75d54
|
Status: | ✅ Deploy successful! |
Preview URL: | https://da5700ec.tutorialkit-docs-page.pages.dev |
Branch Preview URL: | https://docs-theming.tutorialkit-docs-page.pages.dev |
Deploying tutorialkit-demo-page with
|
Latest commit: |
eb24b17
|
Status: | ✅ Deploy successful! |
Preview URL: | https://1506ecdc.tutorialkit-demo-page.pages.dev |
Branch Preview URL: | https://docs-theming.tutorialkit-demo-page.pages.dev |
docs/tutorialkit.dev/astro.config.ts
Outdated
plugins: [starlightLinksValidator()], | ||
plugins: [ | ||
starlightLinksValidator({ | ||
exclude: ['../guides/**/*'], |
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.
I think this is related to HiDeoo/starlight-links-validator#39.
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.
Awesome work Sam! This looks great.
Here are some other thoughts I had while reviewing:
-
The screenshots seem to be blurry / low res on my end and we ought to fix those
-
Potentially we could re-organize some of the sections to improve the structure a bit but we can always do that later. Like I said, this is great and this is just a thought I had. For instance, we could group related elements together. We could have main sections like "Basic Customization" (Logo, Styling), "UI Elements" (Content, Callouts, Statuses, etc.), and "Interactive Components" (File Tree, Terminal, etc.).
-
We may wanna ensure all sections follow the same pattern of presentation. For example, not all sections have a brief description (I think I commented on the one where it was missing), an image (if applicable), and then the list of customizable tokens. Most section follow this pattern but not all. Also the style of the description of each varies.
-
Later down the road it may be helpful if we provide a bit more context on how these elements are used in the interface.
All of the above is not something we have to fix in this PR or fix at all. Just a couple of thoughts, and the docs and everything is something we have to work on iteratively anyways.
Again, overall this is amazing! Thanks for writing this page Sam!
Co-authored-by: Dominic Elm <[email protected]>
I'll try to improve some of the points you mentioned @d3lm. I think the screenshots being blury might have something to do with the fact I created them on my external screen. I think I need to create them on my laptop screen. It's annoying that the end result is different. |
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.
First thing that comes to mind when I started theming: It would be nice to have default theme.css
file generated or available elsewhere so that I could directly change the variables there. Copy-pasting variable names from docs works but is a bit slow.
@AriPerkkio do you think if we had a CLI command that generated a |
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.
This is really good!! Good work on this! 🎉
Yes, something like this would work. Ideally the build process would output separate |
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.
ℹ️ Updated these cause I missed them in the eslint PR.
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.
I added theming to tutorial-vite-plugin.pages.dev/ using this guide. The final theme.css
is here: https://github.com/AriPerkkio/tutorial-vite-plugin/blob/main/theme.css
- Overall the CSS variables work nicely. It felt like I could style most of the stuff I wanted.
- Content like
<code>
and<pre>
rendered from markdown were not customizable so I ended up overwriting private APIs:
:root {
a {
--link-color: var(--my-color-1);
}
pre,
code {
--code-background: var(--my-color-2);
--code-background-color: var(--my-color-3);
--code-color: var(--my-color-4);
}
}
-
Theming editor is not documented here - should it be? I ended up styling it anyway using following vars:
--tk-elements-editor-backgroundColor
--tk-elements-editor-gutter-textColor
--tk-elements-editor-gutter-backgroundColor
-
HMR works nicely but having Webcontainers restart on every save is a lot. My browser felt really slow at some points.
-
For some reason
--tk-elements-fileTree-file-textColorSelected
doesn't work in0.0.1-alpha.23
. It works in TutorialKit's template inmain
though.
It should, but I think we need to improve on the editor in general. I would postpone this to a follow-up PR.
It could be that I fixed/added this one (can't really remember). If it works on |
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.
Minor comment but LGTM 👍
This PR adds a new theming section to https://tutorialkit.dev.
It probably needs some extra eyes to go through the document and tweak where needed.
While documenting, I also created additional PRs to tweak and improve the theming.