Skip to content

Commit

Permalink
Implemented example for <figcaption> tag (#941)
Browse files Browse the repository at this point in the history
* Add HTLM example for <figcapture>

* include <figcaption> in meta.json

* Add style for <figcaption>

* mention an author name

* refactor figcaption.css
  • Loading branch information
dagolinuxoid authored and wbamberg committed May 28, 2018
1 parent e78dd69 commit c22cf71
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
20 changes: 20 additions & 0 deletions live-examples/html-examples/text-content/css/figcaption.css
@@ -0,0 +1,20 @@
figure {
border: thin silver solid;
display: flex;
flex-flow: column;
margin: 0;
padding: 5px;
}

img {
max-height: 220px;
width: 100%;
}

figcaption {
background: #222;
color: #fff;
font: italic smaller sans-serif;
padding: 3px;
text-align: center;
}
4 changes: 4 additions & 0 deletions live-examples/html-examples/text-content/figcaption.html
@@ -0,0 +1,4 @@
<figure>
<img src="/media/examples/hamster.jpg" alt="a cute hamster" />
<figcaption>Hamster by Ricky Kharawala on Unsplash</figcaption>
</figure>
10 changes: 10 additions & 0 deletions live-examples/html-examples/text-content/meta.json
Expand Up @@ -40,6 +40,16 @@
"title": "HTML Demo: <dt>",
"type": "tabbed"
},
"figcaption": {
"baseTmpl": "tmpl/live-tabbed-tmpl.html",
"exampleCode":
"live-examples/html-examples/text-content/figcaption.html",
"cssExampleSrc":
"live-examples/html-examples/text-content/css/figcaption.css",
"fileName": "figcaption.html",
"title": "HTML Demo: <figcaption>",
"type": "tabbed"
},
"hr": {
"baseTmpl": "tmpl/live-tabbed-tmpl.html",
"exampleCode":
Expand Down

0 comments on commit c22cf71

Please sign in to comment.