Giter Site home page Giter Site logo

m-'s Introduction

M- logo

A design system that fully embraces web standards.

M- seeks to leverage HTML, not replace it or try to outsmart it.
This makes M- ideal for all web projects and skill levels.

linkable | tiny 6kb | responsive | WCAG 2.1 accessible | very compatible


M- (pronounced "em dash") is a design system based 100% on web standards. This makes M- extremely light, very fast, and compatible with just about any type of web project.

M- can work with any framework client-side and server-side or no framework at all because it's made from native HTML, custom HTML tags, and Custom Elements. Be it SSR, SPA, PWA, static site, and even some email templates - whatever type of project you have M- will work. This is especially useful to organizations looking to share a design system across products.

Try M- right now by simply linking to the CDN files below and visiting the doc site for code samples and full API documentation. If you want to apply your own design language, fork M- and customize the code (it's a very very easy codebase to work in).

Quick start

This is the web, just link to these in <head> and you're all set!

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/min.css">
<script defer src="https://unpkg.com/[email protected]/dist/min.js"></script>

Or install via NPM and bundle with your own assets: npm install m- (built files are located in /dist)

Then try some M-:

<m-alert type="success">Success!</m-alert>

Browser support

M- works with the latest versions of:

  • Chrome
  • Chrome for Android
  • Safari
  • iOS Safari
  • Firefox
  • Edge

Other modern browsers that support Custom Elements are likely to work, but are not tested (file a bug if you see something). IE is not supported and is unlikely to work even if you polyfill.

Working on this project

Pre-reqs: Node and Gulp CLI

  1. Clone the repo (or fork)
  2. cd m-
  3. npm install
  4. gulp watch
  5. cd docs
  6. npm install
  7. npm start

That builds M-, watches for changes, and starts the doc site. Start coding!

Coding notes

Custom Element constructors have strict rules about what you can safely do inside them. Please get familiar with Requirements for custom element constructors and reactions.

Some components are custom HTML tags that require no JavaScript. Other components are Custom Elements and for these the styles are also maintained in a separate CSS file.

How to publish the npm package

Just run gulp release when a new version is ready to be published. Be sure to set the appropriate semver type (patch, minor, major) in the npm version command in the gulpfile beforehand. Don't forget to then deploy the doc site.

How to deploy the doc site

  1. Zip the contents of docs excluding node_modules.
  2. Go to AWS > us-east-2 > Elastic Beanstalk > Environments > MDocSite-env
  3. Click 'Upload and deploy' button
  4. Pick the .zip file from step one, accept the default version label, and click 'Deploy'
  5. Monitor the deploy. The site goes down for a minute and should automatically come back up with the new version.

Other stuff

Some IDEs complain about unknown HTML tags. If that's the case, add this list to make it happy:

m-accordion, m-alert, m-autocomplete, m-badge, m-box, m-breadcrumb, m-col, m-container, m-dialog, m-dot, m-icon, m-loader, m-menu, m-row, m-tab, m-tabs, m-tag, m-vbar

m-'s People

Contributors

jfbrennan avatar dependabot[bot] avatar alexislefebvre avatar mppfiles avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.