JSPM

monocssbywiktor

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q13905F
    • License MIT

    A lightweight JavaScript library for styling elements using attributes.

    Package Exports

    • monocssbywiktor
    • monocssbywiktor/MonoCSS.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (monocssbywiktor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    MonoCSS

    MonoCSS is a lightweight JavaScript library that allows you to style elements using only attributes.

    Features

    • Style elements using inline attributes
    • Group styles using mncss-group and mncss-use-group
    • Support for animations using mncss-keyframe

    Installation

    Install via npm:

    npm install monocss

    Or include it directly in your project:

    <script src="monocss.js"></script>
    <script src="keyframes.mncss"></script>

    Usage

    Example of styling with attributes:

    <div mncss-group="primary-style" background-color="blue" color="white">
        <h1>Group Style Example</h1>
    </div>
    
    <div mncss-use-group="primary-style">
        <p>This element inherits styles!</p>
    </div>
    
    <div mncss-keyframe="fadeIn" mncss-duration="2s">
        <h2>Fade In Animation</h2>
    </div>

    License

    MIT