Code Monkey home page Code Monkey logo

textretty.css's Introduction

Textretty

A simple typography stylesheet.

Introduction

Textretty is a tiny typography css library. It can be used wherever any readable content is, such as your blog post and a document.

Additionally, textretty provide you with some simple class to construct a page container, which helps you create a single document page (just like the one you are reading) with no extra css.

Get Started

Get the lastest version with git.

$ git clone https://github.com/BigCoke233/textretty.css.git

Or you can just grab the textretty.min.css file in the main branch.

You can also get textretty.min.css with jsDelivr CDN, this method does not require to install.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BigCoke233/textretty.css/dist/textretty.min.css">

说明:jsDelivr 在**大陆地区无法访问

Usage

Textretty only works in the element with textretty class.

<head>
    <!-- ...... -->
    <link rel="stylesheet" href="textretty.css">
    <!-- ...... -->
</head>
<body>
    <!-- ...... -->
    <article class="textretty">
      <!-- your content goes here -->
    </article>
    <!-- ...... -->
</body>

To build a single document page as mentioned, you need textretty-container.

<main class="textretty textretty-container">
  <header>
    <h1>Document Title</h1>
    <p>Information like publish date and category.</p>
  </header>
  <article>
    <!-- your content goes here -->
  </article>
  <footer>
    <p>Copyright &copy; 2022 Textretty</p>
  </footer>
</main>

If you find the container being too wide or slim, replace textretty-container with the ones below.

  • textretty-container-slim: a slimmer page 700px wide at most.
  • textretty-container-wide: a wider page 100px wide at most.

It is notable that all the containers have their padding defined as 2em.

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.