~didrocks/+junk/face-detection-15.04

« back to all changes in this revision

Viewing changes to facedetection/www/bower_components/marked-element/README.md

  • Committer: Didier Roche
  • Date: 2016-05-10 23:09:11 UTC
  • Revision ID: didier.roche@canonical.com-20160510230911-c7xr490zrj3yrzxd
New version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
<!---
 
3
 
 
4
This README is automatically generated from the comments in these files:
 
5
marked-element.html
 
6
 
 
7
Edit those files, and our readme bot will duplicate them over here!
 
8
Edit this file, and the bot will squash your changes :)
 
9
 
 
10
The bot does some handling of markdown. Please file a bug if it does the wrong
 
11
thing! https://github.com/PolymerLabs/tedium/issues
 
12
 
 
13
-->
 
14
 
 
15
[![Build Status](https://travis-ci.org/PolymerElements/marked-element.svg?branch=master)](https://travis-ci.org/PolymerElements/marked-element)
 
16
 
 
17
 
 
18
##&lt;marked-element&gt;
 
19
 
 
20
Element wrapper for the [marked](https://github.com/chjj/marked) library.
 
21
 
 
22
`<marked-element>` accepts Markdown source, and renders it to a child
 
23
element with the class `markdown-html`. This child element can be styled
 
24
as you would a normal DOM element. If you do not provide a child element
 
25
with the `markdown-html` class, the Markdown source will still be rendered,
 
26
but to a shadow DOM child that cannot be styled.
 
27
 
 
28
The Markdown source can be specified either via the `markdown` attribute:
 
29
 
 
30
```html
 
31
<marked-element markdown="`Markdown` is _awesome_!">
 
32
  <div class="markdown-html"></div>
 
33
</marked-element>
 
34
```
 
35
 
 
36
Or, you can provide it via a `<script type="text/markdown">` element child:
 
37
 
 
38
```html
 
39
<marked-element>
 
40
  <div class="markdown-html"></div>
 
41
  <script type="text/markdown">
 
42
    Check out my markdown!
 
43
 
 
44
    We can even embed elements without fear of the HTML parser mucking up their
 
45
    textual representation:
 
46
 
 
47
    ```html
 
48
    <awesome-sauce>
 
49
      <div>Oops, I'm about to forget to close this div.
 
50
    </awesome-sauce>
 
51
    ```
 
52
  </script>
 
53
</marked-element>
 
54
```
 
55
 
 
56
Note that the `<script type="text/markdown">` approach is *static*. Changes to
 
57
the script content will *not* update the rendered markdown!
 
58
 
 
59
### Styling
 
60
 
 
61
If you are using a child with the `markdown-html` class, you can style it
 
62
as you would a regular DOM element:
 
63
 
 
64
```css
 
65
.markdown-html p {
 
66
  color: red;
 
67
}
 
68
 
 
69
.markdown-html td:first-child {
 
70
  padding-left: 24px;
 
71
}
 
72
```
 
73
 
 
74