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

Revisit default styles for markdown #305

Open
wwwillchen opened this issue May 24, 2024 · 4 comments
Open

Revisit default styles for markdown #305

wwwillchen opened this issue May 24, 2024 · 4 comments

Comments

@wwwillchen
Copy link
Collaborator

In particular:

.markdown * {
  margin: 0;
  padding: 0;
  list-style: none;
}

The margin: 0 makes the markdown hard to read.

@wwwillchen
Copy link
Collaborator Author

Rename the CSS classname from "markdown" to something more specific like "error-box-markdown", otherwise it becomes confusing what this is for.

Context: 28c43da

@itsayellow
Copy link

In general the css style currently used for mesop from my reading is more like a "reset css" to be used as a base to apply style on top of. (https://necolas.github.io/normalize.css/) The formatting of this in general seems odd, especially with respect to margins around various text styles, and the zero-margin around the page in general.
Would it be possible to include a default style that is designed to look better, at least as an option to the developer to use?

@wwwillchen
Copy link
Collaborator Author

@itsayellow agree the default styles aren't super easy to work with. Are there specific changes to the default styles that you'd like to see?

The zero-margin around the page is intended to give the app developer greater flexibility, but this requires the app developer to often do some boilerplate to create a container with reasonable margins on the side, e.g.

mesop/mesop/labs/chat.py

Lines 70 to 71 in ad19d57

margin=me.Margin.symmetric(vertical=0, horizontal="auto"),
width="min(1024px, 100%)",

I think we could provide some examples in our demo gallery on setting up this container, but I don't think we will automatically add in margins/padding by default

@itsayellow
Copy link

In my mind I would think that this default style could remain the default, but there would be an alternate style(s) somehow available in the API or built-in files that would allow it to look good in a web browser out of the box.

For me, a lot of the header styles have strange spacings around them--the headers have no space above and a huge amount of space below their lines.

Additionally the zero-margin around the edges means that it needs extra work to look good as its own page, and not as a frame inside a bigger web page.

Lastly, just some general "prettiness" amongst the various styles would be nice, but this is the last priority.

Basically I use this kind of library because I know how to write Python and want to avoid making my own CSS or web design in general as much as humanly possible. 😄

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

No branches or pull requests

2 participants