Skip to content
/ tvcss Public

A flexible layout tool for television and mobile

License

Notifications You must be signed in to change notification settings

xlsdg/tvcss

Repository files navigation

tvcss

A flexible layout tool for television. Heavily inspired in HotCss.

Installation

$ npm install --save tvcss

Usage

  <!DOCTYPE html>
  <html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="tvcss" content="design-width=750"/>
    <script src="/path/to/tvcss.min.js"></script>
  </head>
  <body>
  </body>
  </html>

OR

  <meta name="tvcss" content="initial-dpr=1.0,min-width=320,max-width=1920,design-width=1920"/>
  <script src="//unpkg.com/tvcss/lib/tvcss.min.js"></script>

Config

  • initial-dpr [Optional]
  • min-width [Optional]
  • max-width [Optional]
  • design-width [Required]

Properties

  • dpr
  • minWidth
  • maxWidth
  • designWidth

Methods

  • px2rem
  • rem2px
  • resize
  • update [Delay resize]

License

MIT