No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

card-back.html 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <link href='http://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
  2. <template id="card-back">
  3. <style type='text/css'>
  4. :host {
  5. flex: 1;
  6. display: flex;
  7. border-color: inherit;
  8. background-color: inherit;
  9. }
  10. #outer{
  11. border-radius: 12px;
  12. border-color: inherit;
  13. margin: 9px;
  14. flex: 1;
  15. display: flex;
  16. }
  17. #inner {
  18. margin: 9px;
  19. border: 3px solid;
  20. border-color: inherit;
  21. border-radius: 12px;
  22. flex: 1;
  23. display: flex;
  24. flex-direction: row;
  25. flex-wrap: wrap;
  26. justify-content: center;
  27. align-items: center;
  28. }
  29. #icon {
  30. border: 12px solid;
  31. border-color: inherit;
  32. border-radius: 12px;
  33. width: 80px;
  34. height: 80px;
  35. box-sizing: content-box;
  36. }
  37. ::content > card-icon {
  38. height: 80px;
  39. width: 80px;
  40. }
  41. </style>
  42. <div id="outer">
  43. <div id="inner">
  44. <div id="icon">
  45. <content></content>
  46. </div>
  47. </div>
  48. </div>
  49. </template>
  50. <script>
  51. (function (window, document) {
  52. var elemName = 'card-back';
  53. var mainDoc = document;
  54. var importDoc = document.currentScript.ownerDocument;
  55. var proto = Object.create(HTMLElement.prototype);
  56. proto.createdCallback = function () {
  57. var template = importDoc.getElementById(elemName);
  58. var clone = mainDoc.importNode(template.content, true);
  59. var root = this.createShadowRoot();
  60. root.appendChild(clone);
  61. }
  62. mainDoc.registerElement(elemName, { prototype: proto });
  63. })(window, document);
  64. </script>