@itsquarehub/styles

A shared styles for IT Square Hub projects.

Usage no npm install needed!

<script type="module">
  import itsquarehubStyles from 'https://cdn.skypack.dev/@itsquarehub/styles';
</script>

README

Description

A common styles for ISH project with theming and utilities.

Install

npm install @itsquarehub/styles

or

yarn add @itsquarehub/styles

Usage

@import '~@itsquarehub/styles/theme';
@import '~@itsquarehub/styles/utilities';

@include ish-set-theme(dark);

Custom color pallete

You can create your own color scheme by providing all the color pallete that includes their tone:

Color pallete

Primary, Secondary, Background, Surface, Success, Warning, and Error.

Color tone

Base, Contrast, Shade, and Tint.

Guidelines

Primary color - is the color displayed most frequently across your app’s screens and components. Secondary color - provides more ways to accent and distinguish your product. Having a secondary color is optional, and should be applied sparingly to accent select parts of your UI. Surface color - affect surfaces of components, such as cards, sheets, and menus. Background color - appears behind scrollable content. Success, Warning, Error color - indicates errors in components, such as invalid text in a text field.

To Pick the color pallete: https://material.io/design/color/the-color-system.html#tools-for-picking-colors

:root {
  // Sample color scheme for primary color
  --ish-color-primary-base: #15c1e8;
  --ish-color-primary-contrast: #fafafb;
  --ish-color-primary-shade: #009cb9;
  --ish-color-primary-tint: #84E1F8;
}

Custom font-family and font-size

Set your own font-family according to your standard. By default, the primary font is Roboto and the secondary font is Open Sans.

Primary font will be the heading font Secondary font will be the children of headings font suchs as paragraph, anchor, etc.

:root {
  // Sample font-family settings
  --ish-font-family-primary: 'Roboto';
  --ish-font-family-secondary: 'Open Sans';
}

Set the font-size of the whole document. By default, the base font-size is 15px. XSmall, Small, Medium, and Large font size will be dynamically adjusted. However, you can set their corresponding sizes based on the variable definitions.

:root {
  // Sample font-size settings
  --ish-font-size-base: 15px;

  --ish-font-size-xs: 0.8rem;
  --ish-font-size-sm: 1.0rem;
  --ish-font-size-md: 1.2rem;
  --ish-font-size-lg: 1.5rem;
}

Custom heading scale, browser and spacing

Set your own variable sizes according to your needs.

:root {
  // Heading scale variable
  --ish-heading-scale: 4rem;

  // Space variables
  --ish-space-xs: 0.8rem;
  --ish-space-sm: 1.0rem;
  --ish-space-md: 1.2rem;
  --ish-space-lg: 1.5rem;
  --ish-space-xl: 2.5rem;
}

Reset or Normalize

You can also import the reset or normalize styling from the shared styles

@import '~@itsquarehub/styles/reset';
@import '~@itsquarehub/styles/normalize';

To Test the Code Try this site

https://www.wikimass.com/sass/inspect?filename=example

License

MIT