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: style overrides #17

Closed
wants to merge 1 commit into from
Closed

feat: style overrides #17

wants to merge 1 commit into from

Conversation

deer
Copy link
Owner

@deer deer commented Aug 20, 2023

closes #12

@scottyg, what do you think of this? If you go into tests/styles_fixture you can run deno task start to start the test project. If you open the developer console (I'm assuming chrome -- otherwise you're on your own!) and then do "cmd shift p" followed by searching for "show rendering", you can eventually find a spot where it says "Emulate CSS media feature prefers-color-scheme". This lets you switch between the user's default, forced light, and forced dark.

In the sample project you can see that I've configured the markdown style (via the blog config) to be "auto", i.e. the user's default. Then I've also provided two separate styles in the twind config to demonstrate light and dark. Please let me know if you need more control over things. I guess I can always add more twind class names that can then be overridden in the user's twind config.

@scottyg
Copy link
Contributor

scottyg commented Aug 20, 2023

@deer I like where this is heading. I think the only thing that would be nice would be to allow you to change the class names for main dom element, use case would be if someone wanted to have a side bar or have a full width template. Eventually I'd love to embed the PostList into other page templates, or using "useSeparateIndex" page allowing the PostList to be placed anywhere in the template. But this change is a step in the right direction!

@deer
Copy link
Owner Author

deer commented Aug 20, 2023

Great, thanks for the feedback. I've been busy learning more about tailwind, since I was just hacking things around without understanding the fundamentals. I have a much better sense of what's going on now, and I hope to do everything much better with the next commit. Hopefully that's tomorrow, but who knows.

Note: this is something of a moving target, since there's an effort underway to switch fresh from twind to uno: denoland/fresh#1303.

Can you please log an issue with some thoughts on exporting PostList? In particular, please clarify your use case / motivation. And if you can imagine needing other things in the future, might as well include that for completeness as well. (Just to help me understand how people plan on using this.)

@deer
Copy link
Owner Author

deer commented Aug 20, 2023

Additionally I should mention that the fresh documentation customizes the default https://github.com/denoland/deno-gfm. They do this by linking to a route that produces a stylesheet. This sheet is defined here. This is a nice approach that allows for further customization of the markdown body. I plan on doing this at some point in order to get the markdown to properly behave as well.

@scottyg
Copy link
Contributor

scottyg commented Aug 29, 2023

I feel like this is a good start but maybe we should hold off on styling until the proposed move to uno that you mentioned?

@deer
Copy link
Owner Author

deer commented Aug 29, 2023

Agree, looks like they/re making good progress on the above mentioned PR.

@deer
Copy link
Owner Author

deer commented Feb 2, 2024

Creating a new PR very soon, because this one is too outdated.

@deer deer closed this Feb 2, 2024
@deer deer deleted the style_posts branch February 2, 2024 14:55
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.

Style Posts / Post List
2 participants