0.1.6 • Published 4 years ago

@svelkit/scoped-baseline v0.1.6

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

@svelkit/scoped-baseline

A scoped baseline component to progressively kickstart an elegant, consistent, and simple baseline to build upon.

License Latest Release View changelog Bundle Size

Why?

It fixes some inconsistencies across browsers and devices while providing slightly more opinionated resets to common HTML elements.

Installation

npm install @svelkit/scoped-baseline

And then import it:

// using es modules
import ScopedBaseline from '@svelkit/scoped-baseline'

// common.js
const ScopedBaseline = require('@svelkit/scoped-baseline')

Alternatively use UNPKG or jsDelivr packages.

Hotlinking from unpkg: (no build tool needed!)

import ScopedBaseline from 'https://unpkg.com/@svelkit/scoped-baseline?module'

Usage

Progressively migrate a website to svelkit, using a global reset might not be an option. It's possible to apply the baseline only to the children by using the ScopedBaseline component.

<script>
  import ScopedBaseline from '@svelkit/scoped-baseline'
  import MyApp from './MyApp'
</script>

<ScopedBaseline>
  <!-- The rest of your application -->
  <MyApp />
</ScopedBaseline>

Make sure you import ScopedBaseline first to avoid box-sizing conflicts as in the above example.

License

svelkit is open source software licensed as MIT.

0.1.6

4 years ago

0.1.4

4 years ago

0.1.5

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago