Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 1.43 KB

README.md

File metadata and controls

53 lines (34 loc) · 1.43 KB

MapsIndoors CSS

CSS button component and helpers using MapsIndoors Design Tokens (midt)

The component is using the BEM methodology.

See the demo page (index.html) for an overview.

Release a new version

To release a new version:

  1. Make your changes and commit them
  2. Update the version number in package.json based on Semantic Versioning
  3. Tag the last commit with the version number in this format: v1.2.3
  4. Push your commits with git push origin --tags
  5. GitHub Actions on the repo will create a Release with the tag's version number and push that versioned release to npm

mi-button

The .mi-button block class is used for styling buttons.

Basic example:

<button type="button" class="mi-button mi-button--primary">Click me</button>

Variants:

  • mi-button--primary
  • mi-button--base
  • mi-button--outline
  • mi-button--link.

Helpers

The helpers.css-file is a range of CSS utility classes that each serve a particular purpose.

Example:

<body class="debug">

Sets golden yellow lines around all elements on the page for easier debugging (when using .flex for instance).

Other examples:

  • .max-height-xx-large to set a max-height of 40px
  • .width-none to set a width of none
  • .inline-flex to set display: inline-flex;
  • .margin-auto to center items with margin-left and margin-right set to auto