Socket
Socket
Sign inDemoInstall

@matteusan/sentro

Package Overview
Dependencies
18
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @matteusan/sentro

A low-level SCSS library for building and managing token-driven design systems.


Version published
Weekly downloads
1.3K
decreased by-37.78%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Sentro

A low-level SCSS library for building and managing token-driven design systems.

Installation

# NPM
npm install @matteusan/sentro --save

Documentation

  • The documentation for this project is located here.

Showcase

SCSS Input
@use '@matteusan/sentro' with (
  $prefix: 'sdc',
  $context: 'theme'
);

:root {
  @include sentro.token-config(
    $primary: (
      'default': #122c53,
      'light': #536b99,
      'dark': #061021,
      'ink': #fff
    ),
    $secondary: (
      'default': #ffac00,
      'light': #ffd77e,
      'dark': #533800,
      'ink': #000
    ),
    $radius: (
      'small': 0.3rem,
      'medium': 0.5rem,
      'large': 0.7rem
    ),
  );
}

.my-button-theme {
  background: sentro.key-create('button-fill', 'secondary');
  color: sentro.key-create('button-ink', 'secondary-ink');
  border-color: sentro.key-create('button-border', 'secondary');
  border-radius: sentro.key-create('button-radius', 'radius-small');
}
CSS Output
:root {
  --sdb-theme-primary: #122c53;
  --sdb-theme-primary-light: #536b99;
  --sdb-theme-primary-dark: #061021;
  --sdb-theme-primary-ink: #fff;
  --sdb-theme-secondary: #ffac00;
  --sdb-theme-secondary-light: #ffd77e;
  --sdb-theme-secondary-dark: #533800;
  --sdb-theme-secondary-ink: #000;
  --sdb-theme-radius-small: 0.3rem;
  --sdb-theme-radius-medium: 0.5rem;
  --sdb-theme-radius-large: 0.7rem;
}

.my-button-theme {
  background: var(--sdb-button-fill, var(--sdb-theme-secondary));
  color: var(--sdb-button-ink, var(--sdb-theme-secondary-ink));
  border-color: var(--sdb-button-border, var(--sdb-theme-secondary));
  border-radius: var(--sdb-button-radius, var(--sdb-theme-radius-small));
}

Keywords

FAQs

Last updated on 24 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc