You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@brainly/style-guide-basics

Package Overview
Dependencies
Maintainers
9
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brainly/style-guide-basics

This package contains CSS definitions of variables and clasess for:

0.1.2
latest
npm
Version published
Weekly downloads
43
152.94%
Maintainers
9
Weekly downloads
 
Created
Source

@brainly/style-guide-basics

This package contains CSS definitions of variables and clasess for:

  • fonts
  • colors
  • spacing (paddings/margins)
  • media queries

Install package

yarn install @brainly/style-guide-basics --save-dev

Init package, additionaly init @font-face from style-guide-basics

import '@brainly/style-guide-basics/dist/initFontFace.css';
import '@brainly/style-guide-basics';

Init package with your custom @font-face definition"

import './customFontFaceConfig.css';
import '@brainly/style-guide-basics';

Example usage

CSS - class composition

.header {
  composes: textBit_m from '@brainly/style-guide-basics';
}

CSS - variables

@value size_xxl from '@brainly/style-guide-basics';

.videoContainer {
  margin-top: size_l;
}

CSS - usage with media queries

.header {
  composes: textBit_m from '@brainly/style-guide-basics';
}
.sectionContent {
  display: flex;
  flex-direction: column;
  margin: size_l;
}
@media largeScreen {
  .sectionContent {
    flex-direction: row;
    max-width: contentMaxWidth;
    margin: size_xxl;
  }

  .header {
    /* Note: composes: would not work here :( */
    font-size: textBitFontSize_l;
  }
}

JSX - usage with classes

import {textBit_s} from '@brainly/style-guide-basics';

const header = <h2 className={textBit_s}>Text bit</h2>;

JSX - usage with variables

import {textBit_s, textBitFontSize_l} from '@brainly/style-guide-basics';

const header = (
  <h2
    className={textBit_s}
    style={{
      fontSize: textBitFontSize_l
    }}
  >
    Text bit
  </h2>
);

FAQs

Package last updated on 22 Mar 2019

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