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

.toAttributedString stylesheet parameter #158

Closed
TheMoon2000 opened this issue Jun 27, 2019 · 2 comments
Closed

.toAttributedString stylesheet parameter #158

TheMoon2000 opened this issue Jun 27, 2019 · 2 comments
Labels
documentation Requests for creating or updating documentation

Comments

@TheMoon2000
Copy link

The README only briefly mentions the 'stylesheet:' property (type: String?) as a parameter in .toAttributedString() call. However, the syntax for such a stylesheet is very vague.

but you can override this by passing in your own, using the 'stylesheet:' parameter.

This is the only line of text that talks about the 'stylesheet:' parameter. Can you give me some examples of what the stylesheet can be? Does it follow CSS format?

@NicolasLourenco
Copy link

NicolasLourenco commented Jun 27, 2019

Hello,
For example:

static let defaultMarkdownStylesheet =
    """
      body { font: -apple-system-body }
      h1 { font: -apple-system-title1 }
      h2 { font: -apple-system-title2 }
      h3 { font: -apple-system-title3 }
      h4, h5, h6 { font: -apple-system-headline }
    """

So yes, you can use the css format.

@iwasrobbed
Copy link
Collaborator

Thanks @NicolasLourenco 👍 Going to close this one, but feel free to open a PR if you'd like to add documentation to the readme or code

@iwasrobbed iwasrobbed added the documentation Requests for creating or updating documentation label Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Requests for creating or updating documentation
Projects
None yet
Development

No branches or pull requests

3 participants