3.1.0 • Published 6 years ago

vxv-server v3.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Install

$ npm install vxv-server

Usage

VXV-Server processes your styles just like vxv does including hash prefixing. server() will return a simple string containing all your styles - you can now save those styles somewhere or send them directly to the user.

const vxv = require('vxv');
const server = require('vxv-server');

const mainStyles = vxv`
h1 { font-size: 2rem }
h2 { font-size: 1.5rem }
h3 { font-size: 1.25rem }
h4 { font-size: 1rem }
h5 { font-size: .875rem }
h6 { font-size: .75rem }
`;

const otherStyles = vxv`
p, dl, ol, ul, pre, blockquote {
  margin-top: 1em;
  margin-bottom: 1em;
}
`;

server();
// => All styles even those used in other files -
// => prefixed and concatenated into single string,
// => that you can use for serverside rendering.

License

MIT © Tobias Herber