logo

Petter Envall

Notes
2021
October
20
css-to-go

CSS to go

(
  • css
  • npm
  • web
)
2021-10-20

I recently published an npm package with some CSS in it. It is used for quickly styling a plain HTML document to look somewhat* nice** without applying any CSS at all — only an “activation” class on a desired container element.

The idea is not to have to write any css at all. Just include the file css-to-to.min.css:

<head>
    <link rel="stylesheet" href="https://unpkg.com/css-to-go">
</head>

(or install it via npm and bundle it with your app), and then do something like this:

<body class="ctg-root">
    ... the document is now looking.. spiffy
</body>

This is quite useful when the content itself is generated from markdown or something of that ilk.

The repository and examples are on github, check them out (oh yeah, only the repo can be literally checked out).

* For some values of “somewhat”
** For some values of “nice”