Giter Site home page Giter Site logo

typora-tailwind-theme's Introduction

Tailwind theme for Typora

An implementation of the beautiful Tailwind Typography layout for Typora:

Screenshot of the Tailwind theme

A light and dark theme are provided, which use the prose-xl class and slate grayscale. In particular, the themes are equivalent to:

<article class="prose prose-xl prose-slate dark:prose-invert dark:bg-slate-800">
  ...
</article>

Installation

  1. Go to the Typora theme folder (reachable via the settings menu: Appearance > Open theme folder)
  2. Copy the contents of dist/ into this folder.
  3. Restart Typora and select either 'Tailwind' or 'Tailwind Dark' from the 'Theme' menu.

Customization

As with any theme, the Tailwind and Tailwind Dark themes can be customized by defining rules in tailwind.user.css and tailwind-dark.user.css respectively. In this particular case, tailwind.user.css will also be imported by the Tailwind Dark theme, such that customizations will be applied uniformly. If one only wants to target the light theme, rules can be defined in tailwind-light.user.css.

Grayscale

The slate grayscale can be modified by overriding the --theme-X variables in tailwind.user.css as follows:

:root {
  /* Zinc grayscale */
  --theme-50: #fafafa;
  --theme-100: #f4f4f5;
  --theme-200: #e4e4e7;
  --theme-300: #d4d4d8;
  --theme-400: #a1a1aa;
  --theme-500: #71717a;
  --theme-600: #52525b;
  --theme-700: #3f3f46;
  --theme-800: #27272a;
  --theme-900: #18181b;
}

Note that both the light and dark theme automatically adjust to this grayscale.

Refer to the Tailwind docs for other grayscales (or define your own).

Font

The default Tailwind font is Inter. A different font-family, as well as general adjustments like font-size and line-height can be defined using the #write selector:

#write {
  font-family: "Crimson Pro";
  font-size: 1.6rem;
  line-height: 1.6;
}

I personally find that the Tailwind theme works very well with a serif font like Crimson Pro.

If the chosen font is not in proportion to the monospace font (as is the case with Crimson Pro), one can change this balance by adjusting the monospace font-size through the following variables:

#write {
  --code-blocks-font-size: 0.65em;
  --inline-code-font-size: 0.75em;
}

Additionally, the monospace font-family can be customized through the --monospace variable.

Screenshots

Outline

Outline

Outline (Dark)

Lists

Lists

Lists (Dark)

Other styles

Other styles

Codeblocks

Extensions

Extensions

Diagrams

Diagrams (Dark)

Source code mode

Source mode

Source mode (Dark)

typora-tailwind-theme's People

Contributors

1216892614 avatar andredelft avatar xiaotianxt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

typora-tailwind-theme's Issues

Two-digit index of ordered list is hidden when export to PDF

Thanks for the great theme! I'm reporting this issue that when there're more than 10 items in ordered list and we want to export the Markdown file to PDF, the first digit of the index seem to be hidden.

To reproduce, suppose we create a markdown file like this:

1. a
2. b
3. c
4. d
5. e
6. f
7. g
8. h
9. i
10. j
11. k

It shows perfectly in the editor and the exported HTML. However, when we export it to PDF, we got:

image

The color of index is blue because I've changed the color theme.

I believe this is related to insufficient width, so I modified the padding-left attribute of ol to 2em, which works as expected as a workaround. I wonder if there's anything better we can do.

Word wrap not working inside code block

Hi, i'm having an issue with your theme, that is word wrap is not working inside code block leading to when i export to a PDF file, it's missing the rest inside the code block as below.

image

Here, it's missing the last part,

image

While other themes works just fine with this setting of Typora

image

For example, this is 1 line:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.