项目作者: cube-inc

项目描述 :
Basic SCSS components of Cube web apps
高级语言: Vue
项目地址: git://github.com/cube-inc/cube-scss-components.git
创建时间: 2019-02-25T17:55:41Z
项目社区:https://github.com/cube-inc/cube-scss-components

开源协议:MIT License

下载


cube-scss-components

Why

Because at Cube we manage several web apps and we worry about UI consistency, this project aims to provide basic SCSS components, tailored for SPA and mobile environment.

And because we know you’ll customize any CSS framework you use, we strive to keep it as simple and basic as possible.

Documentation

See the Documentation Reference.

Installation

  1. yarn add cube-scss-components

Getting Started

Usually you import SCSS components you need and you customize variables to match with your visual identity. There is several ways to do so ; here is one way to make it described below.

From your global index.scss:

  1. // Imports your custom "_variables.scss", overrides !defaults
  2. @import "variables";
  3. // Imports the components you need
  4. @import "node_modules/cube-scss-components/src/scss/scaffoldings";
  5. @import "node_modules/cube-scss-components/src/scss/badge";
  6. @import "node_modules/cube-scss-components/src/scss/bullets";
  7. @import "node_modules/cube-scss-components/src/scss/buttons";
  8. @import "node_modules/cube-scss-components/src/scss/buttons_variants";
  9. @import "node_modules/cube-scss-components/src/scss/cards";
  10. @import "node_modules/cube-scss-components/src/scss/forms";
  11. @import "node_modules/cube-scss-components/src/scss/labels";
  12. @import "node_modules/cube-scss-components/src/scss/list_group";
  13. @import "node_modules/cube-scss-components/src/scss/pagination";
  14. @import "node_modules/cube-scss-components/src/scss/slider";
  15. @import "node_modules/cube-scss-components/src/scss/tables";
  16. @import "node_modules/cube-scss-components/src/scss/types";
  17. // Your other imports here…

Your _variables.scss file may looks like:

  1. // Colors
  2. $gray-700: hsl(210, 10%, 30%);
  3. $brand-primary: #8d1760;
  4. $brand-secondary: #ffa7e7;
  5. // Text
  6. $text-color: #54424a;
  7. $link-color: #00c9b1;
  8. $text-muted: lighten($text-color, 30%);
  9. // Fonts
  10. $font-weight-base: 400;
  11. $font-weight-bold: 700;
  12. $font-size-small: 85%;
  13. $line-height-base: 1.5;
  14. // Buttons
  15. $button-primary-color: $brand-primary;
  16. // Component commons
  17. $component-border-radius: 4px;
  18. $component-box-shadow: 0px 3px 16px -2px $gray-700;
  19. // Imports other cube-scss-components variables
  20. @import "node_modules/cube-scss-components/src/scss/_variables.scss";