@citizensadvice/background-size

    1.0.3 • Public • Published

    Background-size npm (scoped)

    Defines the size of the background image.

    Classes

    .bg-cover   { background-size: cover   }
    .bg-contain { background-size: contain }

    Responsive background-size classes

    To apply specific classes at set screen widths, use the following classes:

    Class name Description
    [aboveClassName]-ns Screens with a min-width of 48rem
    [aboveClassName]-m Screens with widths from 48rem to 64rem
    [aboveClassName]-l Screens with a min-width of 64rem

    Examples

    <div class="bg-contain bg-cover-ns">...</div>

    Installation

    $ npm install @citizensadvice/background-size

    now import into your stylesheet...

    @import '@citizensadvice/background-size/index.scss';

    You can also make use of the unpkg service, try adding the link below to the head of your HTML file

    <link src="https://unpkg.com/@citizensadvice/background-size@latest/build/background-size.css" />

    Keywords

    none

    Install

    npm i @citizensadvice/background-size

    DownloadsWeekly Downloads

    10

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    4.08 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar