material-design-lite/README.md

133 lines
5.3 KiB
Markdown
Raw Normal View History

# Material Design Lite
2014-04-16 06:26:21 -07:00
> An implementation of [Material Design](http://www.google.com/design/spec/material-design/introduction.html)
components in vanilla CSS, JS, and HTML
2015-02-04 22:46:41 -08:00
Material Design Lite (MDL) lets you add a Material Design look and feel to your
static content websites. It doesn't rely on any JavaScript frameworks or
libraries. Optimized for cross-device use, gracefully degrades in older
browsers, and offers an experience that is accessible from the get-go.
2015-02-09 06:20:21 -08:00
## Use MDL on your site?
2015-02-09 06:20:21 -08:00
**This document is targeted at developers that will contribute to or compile
MDL. If you are looking to use MDL on your website or web app please head to
[getmdl.io](http://getmdl.io).**
2014-04-16 07:12:57 -07:00
## Browser Support
| IE9 | IE10 | IE11 | Chrome | Opera | Firefox | Safari | Chrome (Android) | Mobile Safari |
|-----|------|------|--------|-------|---------|--------|------------------|---------------|
| B | A | A | A | A | A | A | A | A |
A-grade browsers are fully supported. B-grade browsers will gracefully degrade
to our CSS-only experience.
2015-02-04 02:14:46 -08:00
## Getting Started
2014-04-16 07:12:57 -07:00
### Download / Clone
2015-06-02 04:55:59 -07:00
Clone the repo using Git:
2015-06-02 04:55:59 -07:00
```bash
git clone --bare https://github.com/google/material-design-lite.git
2015-06-02 04:55:59 -07:00
```
Alternatively you can [download](https://github.com/google/material-design-lite/archive/master.zip)
this repository.
2015-06-02 04:55:59 -07:00
> Remember, the master branch is considered unstable. Do not use this in production. Use a tagged state of the repository, npm, or bower for stability!
### What's included
2015-06-02 04:55:59 -07:00
In the repo you'll find the following directories and files.
2015-06-02 04:55:59 -07:00
| File/Folder | Provides |
|-----------------|------------------------------------------------|
| CONTRIBUTING.md | MDL contribution guidelines. |
| docs | Files for documentation the documentation site.|
| gulpfile.js | gulp configuration for MDL. |
| LICENSE | Project license information. |
| package.json | npm package information. |
| README.md | Details for quickly understanding the project. |
| src | Source code for MDL components. |
| templates | Example templates. |
| test | Project test files. |
2015-02-04 22:46:41 -08:00
### Build
2014-06-19 07:22:40 -07:00
To get started modifying the components or the docs, first install the necessary
dependencies, from the root of the project:
2014-06-16 03:26:01 -07:00
```bash
2015-06-01 05:51:05 -07:00
npm install && npm install -g gulp
2015-02-04 02:14:46 -08:00
```
2014-06-16 03:26:01 -07:00
Next, run the following one-liner to compile the components and the docs and
spawn a local instance of the documentation site:
2014-06-16 03:26:01 -07:00
```bash
2015-06-01 05:51:05 -07:00
gulp serve
2015-02-04 02:14:46 -08:00
```
2014-06-06 03:55:13 -07:00
Most changes made to files inside the `src` or the `docs` directory will cause
the page to reload. This page can also be loaded up on physical devices thanks
to BrowserSync.
2015-02-04 02:14:46 -08:00
To build a production version of the components, run:
```bash
2015-06-01 05:51:05 -07:00
gulp
2015-02-04 02:14:46 -08:00
```
2015-06-01 05:51:05 -07:00
This will clean the `dist` folder and rebuild the assets for serving.
2014-06-16 03:14:04 -07:00
2015-04-16 06:55:28 -07:00
### Templates
The `templates/` subdirectory contains a few exemplary usages of MDL. Templates
have their own, quasi-separate gulp pipeline and can be compiled with
`gulp templates`. The templates use the vanilla MDL JS and
[themed](http://www.getmdl.io/customize/index.html) CSS files. Extraneous styles
are kept in a separate CSS file. Use `gulp serve` to take a look at the
templates:
2015-04-16 07:20:39 -07:00
2015-07-06 12:39:12 -07:00
* [Blog Template](http://www.getmdl.io/templates/blog)
* [Dashboard Template](http://www.getmdl.io/templates/dashboard)
* [Text Heavy Webpage Template](http://www.getmdl.io/templates/text-only)
* [Stand Alone Article Template](http://www.getmdl.io/templates/article)
* [Android.com MDL Skin Template](http://www.getmdl.io/templates/android-dot-com)
2015-04-16 06:55:28 -07:00
> Templates are not officially supported in IE9 and legacy browsers that do not
pass the minimum-requirements defined in our
[cutting-the-mustard test](https://github.com/google/material-design-lite/blob/master/src/mdlComponentHandler.js#L262-L275).
2015-02-20 17:18:54 -08:00
## Versioning
For transparency into our release cycle and in striving to maintain backward
compatibility, Material Design Lite is maintained under
[the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up,
but we'll adhere to those rules whenever possible.
2015-03-30 05:36:22 -07:00
## Feature requests
If you find MDL doesn't contain a particular component you think would be
useful, please check the issue tracker in case work has already started on it.
If not, you can request a [new component](https://github.com/Google/material-design-lite/issues/new?title=[Component%20Request]%20{Component}&body=Please%20include:%0A*%20Description%0A*%20Material%20Design%20Spec%20link%0A*%20Use%20Case%28s%29).
Please keep in mind that one of the goals of MDL is to adhere to the Material
Design specs and therefore some requests might not be within the scope of this
project.
2015-02-04 22:46:41 -08:00
## Do you include any features that a framework comes with?
Material Design Lite is focused on delivering a vanilla CSS/JS/HTML library of
components. We are not a framework. If you are building a single-page app and
require features like two-way data-binding, templating, CSS scoping and so
forth, we recommend trying out the excellent [Polymer](http://polymer-project.org) project.
2014-06-06 05:06:29 -07:00
## License
2015-07-07 07:30:28 -07:00
© Google, 2015. Licensed under an [Apache-2](https://github.com/google/material-design-lite/blob/master/LICENSE) license.