Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@one-platform/opc-styles

Package Overview
Dependencies
Maintainers
7
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@one-platform/opc-styles

This packages contains the all common styles which are important to get #### started with any component which includes global variables, colors, common mixin

latest
npmnpm
Version
0.0.7
Version published
Maintainers
7
Created
Source

Welcome to OPC Style Library 👋

This packages contains the all common styles which are important to get started with any component which includes global variables, colors, common mixin etc.

Version Maintenance

Usage:

Import the opc-style.scss into your style file

  @import "@one-platform/opc-styles";

adding color theme to component with local css custom property use opc-get-var function Note: see function/_custom-properties.scss for full function documentation.

opc-button.scss

  op-button.soft {
    background-color: #{opc-get-var(BackgroundColor, $opc-color--blue-50, soft)};
    color: #{opc-get-var(TextColor, $opc-color--blue-400, soft)};
    border-color: #{opc-get-var(BorderColor, $opc-color--blue-400, soft)};
  }

  op-button.flat {
    background-color: #{opc-get-var(BackgroundColor, $opc-color--blue-50, flat)};
    color: #{opc-get-var(TextColor, $opc-color--blue-400, flat)};
    border-color: transparent;
  }

opc-button.scss

  op-button.soft {
    background-color: var(--opc-button__soft--BackgroundColor, #E7F1FA);
    color: var(--opc-button__soft--TextColor, #0066CC);
    border-color: var(--opc-button__soft--BorderColor, #0066CC); 
  }

  op-button.flat {
    background-color: var(--opc-button__flat--BackgroundColor, #E7F1FA);
    color: var(--opc-button__flat--TextColor, #0066CC);
    border-color: transparent; 
  }
  

Adding the Headings style to the component

Use the mixin which are defined in the headings.scss file e.g.

  .app-heading {
    @include heading--three
  }

this will convert to the css

  .app-heading {
    font-family: var(--opc-global--Heading--font-Family, "RedHatDisplay");
    font-size: 1.5rem;
    font-weight: 500;
  }

Using Spacing and Gaps to the component

use the global Gap and spacing variables to add space, these variables are using css pixel unit for distance which are defined in the variables/_1-definitions.scss file

🤝 Contributors

👤 Sumeet Ingole @gisumit

👤 Deepesh Nair @hybridx

FAQs

Package last updated on 24 Dec 2021

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