miam-ds
v1.2.5
Published
Sass and Css styles for Miam Design System
Downloads
866
Readme
Miam Design System
Getting started
Install dependencies
npm install
Build css
npm run build
Try locally
npm run serve
Open http://localhost:8080 in your browser
Contributing
Design system reference files
- Web UI kit : https://www.figma.com/file/TvdkWJGeGaMQ9a3r3kmejY
- Brand Foundation : https://www.figma.com/file/SQk0Q72cmgFI467RhsacPy
Conventions
- Everything directly coming from the brand foundation document (such as colors, spacings, and general conventions) should be put in variables.scss
- Every css code snippet that can be duplicated from one CSS class to another should be put in mixins.scss
- Every style that should be generic and is not a component should be defined in styles.scss (eg: keyframes for animations)
- Follow hierarchy and naming as defined in the Web UI kit document: components are organized in Figma files :
- 1 figma file = 1 scss stylesheet in /components
- 1 component = 1 class
- CSS class name should be prefixed with
.miam-ds-
and reuse the component naming as per the Web UI kit document (eg:.miam-ds-button
)
- Be cautious with your imports : while designing a component, you can import variables and mixins files as much as you like (they won't be compiled in the minified css stylesheet), but everytime you import another component, its code will be duplicated in the minified CSS => to be avoided. If you feel like you need to import another component style, you probably need a mixin...
Using within a separate project
Install package
npm install miam-ds
Import package in your project
In styles.scss, link the minified stylesheet:
@import "~miam-ds/miam-ds.min.css";
Then, start using miam-ds colors and css classes:
<div style="background-color: var(--miam-ds-color-page-background)">
All my pages will now have this background
</div>
<button class="miam-ds-button success">
New style for all my buttons!
</button>
Override classes using variables, mixins and styles
TODO