0.0.4 • Published 2 years ago

@jismete/theme v0.0.4

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
2 years ago

Jismete Theme

This jismete base theme contains the predefined base theme colors, mixin, typography, spacing variables, grid, icons and functions useful for the jismete components.

Installation

Below command:

npm install @jismete/theme

Build

Below command:

lerna run build --scope @jismete/theme --stream

Import

To use the jismete base theme, simply use the import statement in your ts file. Use CDN URLs to import this themes to html file.

Usage

Using themes variables

/* Set styling for a checkbox element */
/* _component.scss */
chip {
  min-width: $chip-min-width;
  height: $chip-height;
  background-color: var(--chip-background-color);
  color: var(--chip-label-font-color);
  padding: 0 var(--spacing-03);
  margin-left: var(--spacing-03);
  color: var(--chip-close-icon-color);
}
/* component-map.scss*/
--chip-background-color: var(--secondary);
--chip-label-font-family: var(--global-font-family);
--chip-label-font-color: var(--neutral);
--chip-close-icon-color: var(--neutral);

// non-customize variable
$chip-min-width: 44px;
$chip-height: 30px;

Using mixins & functions

/* _component.scss */
button {
  @include border-radius(5px); // mixin to apply border-radius to all sides
  height: calculate_rem(24px); // function to convert px to rem
  width: 100%;
}

Global colors

Color VariableColor Code (HEX)
--primary#0C71AC
--secondary#0A57A1
--tertiary#13294E
--error#D9222A
--warning#B95000
--neutral#FFFFFF

Extended colors

Color VariableColor Code (HEX)
--star-rate#DC791E
--separator-01#E1E6ED
--global-bg#F5F8FB
--infopanel-bg#FDFCC7
--specialmessage-bg#FAF0DE

Text colors

Color VariableColor Code (HEX)
--primary-text#1A2228
--secondary-text#505660
--tertiary-text#6A7078
--disabled-text#6A7078
--links#0C71AC
--pricing#218336
--error-text#D9222A
--neutral#FFFFFF

Rating bar colors

Color VariableColor Code (HEX)
--rating-excellent#218336
--rating-great#67AB04
--rating-average#D99B22
--rating-poor#D97322
--rating-bad#D9222A

Alert title colors

Color VariableColor Code (HEX)
--success-title#218336
--error-title#D9222A
--warning-title#b95000
--info-title#2e5aac

Alert panel colors

Color VariableColor Code (HEX)
--success-panelfill#F8FFFC
--success-panelborder#218336
--error-panelfill#FFF4F4
--error-panelborder#D9222A
--warning-panelfill#FDFAF3
--warning-panelborder#B95000
--info-panelfill#F0F3FA
--info-panelborder#2E5AAC

Button hover and focus colors

Color VariableColor Code (HEX)
--hover-primary#2FAA48
--focus-primary#26a23f
--hover-secondary#0C69C2
--focus-secondary#0C69C2
--hover-tertiary#0C69C2
--focus-tertiary#0C69C2

Typography

ClassesFont sizeFont weightLine height
--txt--sm-sb-sm1.26001
--txt--sm-r-sm1.24001
--txt--md-sb-sm1.46001
--txt--md-r-sm1.44001
--txt--lg-sb-sm1.66001
--txt--lg-r-sm1.64001
--txt--xl-r-sm1.84001
--txt--xl-sb-sm1.86001
--txt--sm-sb-md1.26001.2
--txt--sm-r-md1.24001.2
--txt--md-sb-md1.46001.2
--txt--md-r-md1.44001.2
--txt--lg-sb-md1.66001.2
--txt--xl-sb-md1.86001.2
--txt--sm-r-md1.24001.5
--txt--sm-sb-md1.26001.5
--txt--md-sb-md1.46001.5
--txt--md-r-md1.44001.5
--txt--lg-sb-md1.66001.5

Mixins

Mixin NameUses
border-radiusTo apply border radius to all sides of an element
paddingTo apply padding to all side of an element
padding-horizontalTo apply padding to left & right sides only of an element
marginTo apply margin to all side of an element
margin-horizontalTo apply margin to left & right sides only of an element
font-smoothingFor font smoothing
text-inheritTo inherit all properties of a parent elementfont-family, font-size, font-style, font-weight, letter-spacing

Functions

Function NameUses
calculate_emTo convert px into em
calculate_remTo convert px into rem
encode-svgTo encode svg for background images
str-replaceIt is useful to provide dynamic string

Trigger changes - 1

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

5.1.10

2 years ago