Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@monster_property_services/monster-global-styles

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@monster_property_services/monster-global-styles

This is a package to store the global css variables for the monster web components

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Monster Global Styles 🎨

This package is exporting a globalStyles constant containing css variables with default company level rules. These variables will be imported in each monster web component in order to keep the same look and feel for the layout.

Installation 📦️

You can start using this package right away like this:

  1. CDN
<script type="module" src="https://unpkg.com/@monster_property_services/monster-global-styles@latest"></script>
  1. npm
npm i @monster_property_services/monster-global-styles

Usage ✨:

In your web component initialization:

import { LitElement, css, html } from 'lit';
import { globalStyles } from '@monster_property_services/monster-global-styles';

export class MyWebComponent extends LitElement {
    static styles = [
        globalStyles, // Include global style inside of the styles array object
        css`
        .my-class {
            margin-top: var(--mp-wc-default-spacing);
        }` // Then you can add your own css code and reference the variables declared in the globalStyles object
    ];

    // Then the rest of your Lit web component code
    constructor() {}

    render() {
        return html`<h1 class="my-class">Test</h1>`;
    }
}

customElements.define('my-web-component', MyWebComponent);

Keywords

FAQs

Package last updated on 18 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc