Switch from Less to Garden

This commit is contained in:
Daniel Compton 2017-11-21 16:07:28 +13:00
parent 1854ca2081
commit 590343b36d
6 changed files with 1360 additions and 15 deletions

View File

@ -7,9 +7,10 @@
[reagent "0.6.0" :scope "provided"]
[re-frame "0.10.2" :scope "provided"]
[cljsjs/d3 "4.3.0-5"]
[binaryage/devtools "0.9.4"]]
:plugins [[lein-less "1.7.5"]
[thomasa/mranderson "0.4.7"]]
[binaryage/devtools "0.9.4"]
[garden "1.3.3"]]
:plugins [[thomasa/mranderson "0.4.7"]
[lein-less "RELEASE"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}

View File

@ -0,0 +1,925 @@
#--re-frame-trace-- {
all: initial;
line-height: 1.15;
font-size: 12px;
}
#--re-frame-trace-- * {
all: unset;
}
#--re-frame-trace-- div,
#--re-frame-trace-- nav {
display: block;
}
#--re-frame-trace-- pre {
font-family: monospace;
font-size: 1em;
}
#--re-frame-trace-- a,
#--re-frame-trace-- a:visited {
color: #222;
border-bottom: 1px #333 dotted;
}
#--re-frame-trace-- a:hover,
#--re-frame-trace-- a:focus {
border-bottom: 1px #666666 solid;
}
#--re-frame-trace-- code {
font-family: monospace;
font-size: 1em;
}
#--re-frame-trace-- small {
font-size: 80%;
}
#--re-frame-trace-- sub,
#--re-frame-trace-- sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
#--re-frame-trace-- sub {
bottom: -0.25em;
}
#--re-frame-trace-- sup {
top: -0.5em;
}
#--re-frame-trace-- img {
border-style: none;
}
#--re-frame-trace-- option {
display: block;
}
#--re-frame-trace-- button,
#--re-frame-trace-- input,
#--re-frame-trace-- optgroup,
#--re-frame-trace-- select,
#--re-frame-trace-- textarea {
font-family: "courier new", monospace;
font-size: 100%;
padding: 3px 3px 1px 3px;
border: 1px solid #999;
}
#--re-frame-trace-- button,
#--re-frame-trace-- input {
overflow: visible;
}
#--re-frame-trace-- button:focus,
#--re-frame-trace-- select:focus {
outline: #999 dotted 1px;
}
#--re-frame-trace-- button,
#--re-frame-trace-- html[type="button"],
#--re-frame-trace-- [type="reset"],
#--re-frame-trace-- [type="submit"] {
-webkit-appearance: button;
}
#--re-frame-trace-- button:-moz-focusring,
#--re-frame-trace-- [type="button"] {
outline: 1px dotted ButtonText;
}
#--re-frame-trace-- textarea {
overflow: auto;
}
#--re-frame-trace-- [type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
#--re-frame-trace-- li {
display: block;
}
#--re-frame-trace-- button {
overflow: visible;
border: 0;
-webkit-font-smoothing: inherit;
letter-spacing: inherit;
background: none;
cursor: pointer;
}
#--re-frame-trace-- img {
max-width: 100%;
height: auto;
border: 0;
}
#--re-frame-trace-- table,
#--re-frame-trace-- thead,
#--re-frame-trace-- tbody,
#--re-frame-trace-- tfoot,
#--re-frame-trace-- tr,
#--re-frame-trace-- th,
#--re-frame-trace-- td {
width: auto;
border-color: inherit;
height: auto;
margin: 0;
border: none;
vertical-align: inherit;
padding: 0;
border-collapse: collapse;
text-align: left;
font-weight: inherit;
-webkit-border-horizontal-spacing: 0;
border-spacing: 0;
display: block;
-webkit-border-vertical-spacing: 0;
}
#--re-frame-trace-- table {
display: table;
}
#--re-frame-trace-- th,
#--re-frame-trace-- td {
display: table-cell;
padding: 0 5px;
}
#--re-frame-trace-- tr {
display: table-row;
}
#--re-frame-trace-- thead {
display: table-header-group;
}
#--re-frame-trace-- tbody {
display: table-row-group;
}
#--re-frame-trace-- th,
#--re-frame-trace-- td {
display: table-cell;
}
#--re-frame-trace-- tr {
display: table-row;
}
#--re-frame-trace-- {
background: white;
font-family: "courier new", monospace;
color: #222;
}
#--re-frame-trace-- .label {
color: #222;
background: #fafafa;
border: 1px solid #efeef1;
font-size: 0.9em;
margin: 10px 5px;
}
#--re-frame-trace-- table {
width: 100%;
font-size: 14px;
}
#--re-frame-trace-- tbody {
color: #222;
}
#--re-frame-trace-- thead {
font-weight: bold;
}
#--re-frame-trace-- tr th,
#--re-frame-trace-- tr td {
padding: 6px;
}
#--re-frame-trace-- tr th:first-child {
text-align: right;
}
#--re-frame-trace-- tr.trace--trace {
}
#--re-frame-trace-- tr:nth-child(even) {
background: #fafafa;
}
#--re-frame-trace-- tr.trace--sub-create .trace--op {
color: #008766;
}
#--re-frame-trace-- tr.trace--sub-run .trace--op {
color: #762cff;
}
#--re-frame-trace-- tr.trace--event .trace--op {
color: #a66900;
}
#--re-frame-trace-- tr.trace--render .trace--op {
color: #007cc2;
}
#--re-frame-trace-- tr.trace--fsm-trigger .trace--op {
color: #284694;
}
#--re-frame-trace-- .button {
padding: 5px 5px 3px;
margin: 5px;
border-radius: 2px;
cursor: pointer;
}
#--re-frame-trace-- .text-button {
border-bottom: 1px dotted #888;
font-weight: normal;
}
#--re-frame-trace-- .text-button:focus {
outline: #999 dotted 1px;
}
#--re-frame-trace-- .icon-button {
font-size: 10px;
}
#--re-frame-trace-- button.tab {
}
#--re-frame-trace-- .popout-icon {
max-width: 15px;
cursor: pointer;
padding: 0 5px;
margin: 0 5px;
}
#--re-frame-trace-- .tab {
background: transparent;
border-radius: 0;
text-transform: uppercase;
font-family: monospace;
letter-spacing: 2px;
margin-bottom: 0;
padding-bottom: 4px;
vertical-align: bottom;
}
#--re-frame-trace-- .tab.active {
background: transparent;
border-bottom: 3px solid gray;
border-radius: 0;
padding-bottom: 1px;
}
#--re-frame-trace-- ul.filter-items,
#--re-frame-trace-- .subtrees {
list-style-type: none;
margin: 0 5px;
}
#--re-frame-trace-- ul.filter-items .subtree-button,
#--re-frame-trace-- ul.filter-items .filter-item,
#--re-frame-trace-- .subtrees .subtree-button,
#--re-frame-trace-- .subtrees .filter-item {
display: inline-block;
}
#--re-frame-trace-- ul.filter-items .subtree-button .filter-item-string,
#--re-frame-trace-- ul.filter-items .filter-item .filter-item-string,
#--re-frame-trace-- .subtrees .subtree-button .filter-item-string,
#--re-frame-trace-- .subtrees .filter-item .filter-item-string {
color: #222;
background: yellow;
}
#--re-frame-trace-- ul.filter-items .subtree-button .subtree-button-string,
#--re-frame-trace-- ul.filter-items .filter-item .subtree-button-string,
#--re-frame-trace-- .subtrees .subtree-button .subtree-button-string,
#--re-frame-trace-- .subtrees .filter-item .subtree-button-string {
color: #222;
}
#--re-frame-trace-- ul.filter-items .subtree-button:hover,
#--re-frame-trace-- ul.filter-items .subtree-button:focus,
#--re-frame-trace-- ul.filter-items .filter-item:hover,
#--re-frame-trace-- ul.filter-items .filter-item:focus,
#--re-frame-trace-- .subtrees .subtree-button:hover,
#--re-frame-trace-- .subtrees .subtree-button:focus,
#--re-frame-trace-- .subtrees .filter-item:hover,
#--re-frame-trace-- .subtrees .filter-item:focus {
text-decoration: line-through;
}
#--re-frame-trace-- .icon {
display: inline-block;
width: 1em;
height: 1em;
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
}
#--re-frame-trace-- .icon-remove {
margin-left: 10px;
}
#--re-frame-trace-- .filter {
box-shadow: -7px 15px 6px -15px rgba(0, 0, 0, 0.3);
z-index: 1001;
}
#--re-frame-trace-- .filter .filter-control select {
border-bottom: 1px solid #8f8f8f;
appearance: menulist;
font-family: "courier new", monospace;
-moz-appearance: menulist;
-webkit-appearance: menulist;
border: none;
padding: 2px 0 0 0;
font-size: 1em;
display: inline-block;
background: white;
}
#--re-frame-trace-- .filter .filter-control .filter-control-input {
border-bottom: 1px solid #8f8f8f;
display: inline-block;
}
#--re-frame-trace-- {
all: initial;
line-height: 1.15;
font-size: 12px;
}
#--re-frame-trace-- * {
all: unset;
}
#--re-frame-trace-- div,
#--re-frame-trace-- nav {
display: block;
}
#--re-frame-trace-- pre {
font-family: monospace;
font-size: 1em;
}
#--re-frame-trace-- a,
#--re-frame-trace-- a:visited {
color: #222;
border-bottom: 1px #333 dotted;
}
#--re-frame-trace-- a:hover,
#--re-frame-trace-- a:focus {
border-bottom: 1px #666666 solid;
}
#--re-frame-trace-- code {
font-family: monospace;
font-size: 1em;
}
#--re-frame-trace-- small {
font-size: 80%;
}
#--re-frame-trace-- sub,
#--re-frame-trace-- sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
#--re-frame-trace-- sub {
bottom: -0.25em;
}
#--re-frame-trace-- sup {
top: -0.5em;
}
#--re-frame-trace-- img {
border-style: none;
}
#--re-frame-trace-- option {
display: block;
}
#--re-frame-trace-- button,
#--re-frame-trace-- input,
#--re-frame-trace-- optgroup,
#--re-frame-trace-- select,
#--re-frame-trace-- textarea {
font-family: "courier new", monospace;
font-size: 100%;
padding: 3px 3px 1px 3px;
border: 1px solid #999;
}
#--re-frame-trace-- button,
#--re-frame-trace-- input {
overflow: visible;
}
#--re-frame-trace-- button:focus,
#--re-frame-trace-- select:focus {
outline: #999 dotted 1px;
}
#--re-frame-trace-- button,
#--re-frame-trace-- html[type="button"],
#--re-frame-trace-- [type="reset"],
#--re-frame-trace-- [type="submit"] {
-webkit-appearance: button;
}
#--re-frame-trace-- button:-moz-focusring,
#--re-frame-trace-- [type="button"] {
outline: 1px dotted ButtonText;
}
#--re-frame-trace-- textarea {
overflow: auto;
}
#--re-frame-trace-- [type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
#--re-frame-trace-- li {
display: block;
}
#--re-frame-trace-- button {
overflow: visible;
border: 0;
-webkit-font-smoothing: inherit;
letter-spacing: inherit;
background: none;
cursor: pointer;
}
#--re-frame-trace-- img {
max-width: 100%;
height: auto;
border: 0;
}
#--re-frame-trace-- table,
#--re-frame-trace-- thead,
#--re-frame-trace-- tbody,
#--re-frame-trace-- tfoot,
#--re-frame-trace-- tr,
#--re-frame-trace-- th,
#--re-frame-trace-- td {
width: auto;
border-color: inherit;
height: auto;
margin: 0;
border: none;
vertical-align: inherit;
padding: 0;
border-collapse: collapse;
text-align: left;
font-weight: inherit;
-webkit-border-horizontal-spacing: 0;
border-spacing: 0;
display: block;
-webkit-border-vertical-spacing: 0;
}
#--re-frame-trace-- table {
display: table;
}
#--re-frame-trace-- th,
#--re-frame-trace-- td {
display: table-cell;
padding: 0 5px;
}
#--re-frame-trace-- tr {
display: table-row;
}
#--re-frame-trace-- thead {
display: table-header-group;
}
#--re-frame-trace-- tbody {
display: table-row-group;
}
#--re-frame-trace-- th,
#--re-frame-trace-- td {
display: table-cell;
}
#--re-frame-trace-- tr {
display: table-row;
}
#--re-frame-trace-- {
background: white;
font-family: 'courier new', monospace;
color: #222;
}
#--re-frame-trace-- .label {
color: #222;
background: #fafafa;
border: 1px solid #efeef1;
font-size: 0.9em;
margin: 10px 5px;
}
#--re-frame-trace-- table {
width: 100%;
font-size: 14px;
}
#--re-frame-trace-- tbody {
color: #222;
}
#--re-frame-trace-- thead {
font-weight: bold;
}
#--re-frame-trace-- tr th,
#--re-frame-trace-- tr td {
padding: 6px;
}
#--re-frame-trace-- tr th:first-child {
text-align: right;
}
#--re-frame-trace-- tr.trace--trace {
}
#--re-frame-trace-- tr:nth-child(even) {
background: #fafafa;
}
#--re-frame-trace-- tr.trace--sub-create .trace--op {
color: #008766;
}
#--re-frame-trace-- tr.trace--sub-run .trace--op {
color: #762cff;
}
#--re-frame-trace-- tr.trace--event .trace--op {
color: #A66900;
}
#--re-frame-trace-- tr.trace--render .trace--op {
color: #007CC2;
}
#--re-frame-trace-- tr.trace--fsm-trigger .trace--op {
color: #284694;
}
#--re-frame-trace-- .button {
padding: 5px 5px 3px;
margin: 5px;
border-radius: 2px;
cursor: pointer;
}
#--re-frame-trace-- .text-button {
border-bottom: 1px dotted #888;
font-weight: normal;
}
#--re-frame-trace-- .text-button:focus {
outline: #999 dotted 1px;
}
#--re-frame-trace-- .icon-button {
font-size: 10px;
}
#--re-frame-trace-- button.tab {
}
#--re-frame-trace-- .popout-icon {
max-width: 15px;
cursor: pointer;
padding: 0 5px;
margin: 0 5px;
}
#--re-frame-trace-- .tab {
background: transparent;
border-radius: 0;
text-transform: uppercase;
font-family: monospace;
letter-spacing: 2px;
margin-bottom: 0;
padding-bottom: 4px;
vertical-align: bottom;
}
#--re-frame-trace-- .tab.active {
background: transparent;
border-bottom: 3px solid gray;
border-radius: 0;
padding-bottom: 1px;
}
#--re-frame-trace-- ul.filter-items,
#--re-frame-trace-- .subtrees {
list-style-type: none;
margin: 0 5px;
}
#--re-frame-trace-- ul.filter-items .subtree-button,
#--re-frame-trace-- ul.filter-items .filter-item,
#--re-frame-trace-- .subtrees .subtree-button,
#--re-frame-trace-- .subtrees .filter-item {
display: inline-block;
}
#--re-frame-trace-- ul.filter-items .subtree-button .filter-item-string,
#--re-frame-trace-- ul.filter-items .filter-item .filter-item-string,
#--re-frame-trace-- .subtrees .subtree-button .filter-item-string,
#--re-frame-trace-- .subtrees .filter-item .filter-item-string {
color: #222;
background: yellow;
}
#--re-frame-trace-- ul.filter-items .subtree-button .subtree-button-string,
#--re-frame-trace-- ul.filter-items .filter-item .subtree-button-string,
#--re-frame-trace-- .subtrees .subtree-button .subtree-button-string,
#--re-frame-trace-- .subtrees .filter-item .subtree-button-string {
color: #222;
}
#--re-frame-trace-- ul.filter-items .subtree-button:hover,
#--re-frame-trace-- ul.filter-items .subtree-button:focus,
#--re-frame-trace-- ul.filter-items .filter-item:hover,
#--re-frame-trace-- ul.filter-items .filter-item:focus,
#--re-frame-trace-- .subtrees .subtree-button:hover,
#--re-frame-trace-- .subtrees .subtree-button:focus,
#--re-frame-trace-- .subtrees .filter-item:hover,
#--re-frame-trace-- .subtrees .filter-item:focus {
text-decoration: line-through;
}
#--re-frame-trace-- .icon {
display: inline-block;
width: 1em;
height: 1em;
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
}
#--re-frame-trace-- .icon-remove {
margin-left: 10px;
}
#--re-frame-trace-- .filter {
box-shadow: -7px 15px 6px -15px rgba(0, 0, 0, 0.3);
z-index: 1001;
}
#--re-frame-trace-- .filter .filter-control select {
border-bottom: 1px solid #8f8f8f;
appearance: menulist;
font-family: 'courier new', monospace;
-moz-appearance: menulist;
-webkit-appearance: menulist;
border: none;
padding: 2px 0 0 0;
font-size: 1em;
display: inline-block;
background: white;
}
#--re-frame-trace-- .filter .filter-control .filter-control-input {
border-bottom: 1px solid #8f8f8f;
display: inline-block;
}
#--re-frame-trace-- .filter .filter-control .filter-control-input:before {
display: inline-block;
color: #8f8f8f;
content: "⚲";
transform: rotate(-45deg);
}
#--re-frame-trace-- .filter .filter-control .filter-control-input input {
border: none;
}
#--re-frame-trace-- .filter-control-input {
display: flex;
flex: 0 0 auto;
}
#--re-frame-trace-- .nav {
background: #efeef1;
color: #222;
}
#--re-frame-trace--.external-window {
display: flex;
height: 100%;
flex: 1 1 auto;
}
#--re-frame-trace-- .panel-content-top {
}
#--re-frame-trace-- .panel-content-scrollable {
padding-top: 20px;
display: flex;
flex-direction: column;
flex: 1 1 auto;
overflow-x: auto;
overflow-y: auto;
z-index: 1000;
}
#--re-frame-trace-- .tab-contents {
display: flex;
flex: 1 1 auto;
flex-direction: column;
}
#--re-frame-trace-- .filter-control {
margin: 10px 0 0 10px;
}
#--re-frame-trace-- .filter-items-count.active {
background: yellow;
}
#--re-frame-trace-- .filter-items-count.active:hover {
text-decoration: line-through;
}
#--re-frame-trace-- .filter-fields {
margin-top: 10px;
}
#--re-frame-trace-- .filter-category {
display: inline-block;
background: #efeef1;
cursor: pointer;
padding: 5px;
margin: 5px;
opacity: 0.3;
}
#--re-frame-trace-- .active {
opacity: 1;
}
#--re-frame-trace-- .re-frame-trace--object .toggle {
color: #8f8f8f;
cursor: pointer;
line-height: 1;
}
#--re-frame-trace-- .re-frame-trace--objectspan {
vertical-align: text-top;
}
#--re-frame-trace-- .host-closed {
font-size: 4em;
background-color: hsla(60, 100%, 50%, 0.8);
}
#--re-frame-trace-- .expansion-button {
font-family: sans-serif;
width: 16px;
padding: 0 2px;
vertical-align: middle;
}
#--re-frame-trace-- .filter .filter-control .filter-control-input:before {
display: inline-block;
color: #8f8f8f;
content: "⚲";
transform: rotate(-45deg);
}
#--re-frame-trace-- .filter .filter-control .filter-control-input input {
border: none;
}
#--re-frame-trace-- .filter-control-input {
display: flex;
flex: 0 0 auto;
}
#--re-frame-trace-- .nav {
background: #efeef1;
color: #222;
}
#--re-frame-trace--.external-window {
display: flex;
height: 100%;
flex: 1 1 auto;
}
#--re-frame-trace-- .panel-content-top {
}
#--re-frame-trace-- .panel-content-scrollable {
padding-top: 20px;
display: flex;
flex-direction: column;
flex: 1 1 auto;
overflow-x: auto;
overflow-y: auto;
z-index: 1000;
}
#--re-frame-trace-- .tab-contents {
display: flex;
flex: 1 1 auto;
flex-direction: column;
}
#--re-frame-trace-- .filter-control {
margin: 10px 0 0 10px;
}
#--re-frame-trace-- .filter-items-count.active {
background: yellow;
}
#--re-frame-trace-- .filter-items-count.active:hover {
text-decoration: line-through;
}
#--re-frame-trace-- .filter-fields {
margin-top: 10px;
}
#--re-frame-trace-- .filter-category {
display: inline-block;
background: #efeef1;
cursor: pointer;
padding: 5px;
margin: 5px;
opacity: 0.3;
}
#--re-frame-trace-- .active {
opacity: 1;
}
#--re-frame-trace-- .re-frame-trace--object .toggle {
color: #8f8f8f;
cursor: pointer;
line-height: 1;
}
#--re-frame-trace-- .re-frame-trace--objectspan {
vertical-align: text-top;
}
#--re-frame-trace-- .host-closed {
font-size: 4em;
background-color: hsla(60, 100%, 50%, 0.8);
}
#--re-frame-trace-- .expansion-button {
font-family: sans-serif;
width: 16px;
padding: 0 2px;
vertical-align: middle;
}

View File

@ -22,39 +22,47 @@
/* re-frame-trace styles
========================================================================== */
background: white;
font-family: 'courier new', monospace;
font-family: "courier new", monospace;
color: #222222;
/* mixins */
/* app-db data viewer
========================================================================== */
}
#--re-frame-trace-- * {
all: unset;
}
#--re-frame-trace-- div,
#--re-frame-trace-- nav {
display: block;
}
#--re-frame-trace-- pre {
font-family: monospace, monospace;
font-size: 1em;
}
#--re-frame-trace-- a,
#--re-frame-trace-- a:visited {
color: #222222;
border-bottom: 1px #333 dotted;
}
#--re-frame-trace-- a:hover,
#--re-frame-trace-- a:focus {
border-bottom: 1px #666666 solid;
}
#--re-frame-trace-- code {
font-family: monospace, monospace;
font-size: 1em;
}
#--re-frame-trace-- small {
font-size: 80%;
}
#--re-frame-trace-- sub,
#--re-frame-trace-- sup {
font-size: 75%;
@ -62,18 +70,23 @@
position: relative;
vertical-align: baseline;
}
#--re-frame-trace-- sub {
bottom: -0.25em;
}
#--re-frame-trace-- sup {
top: -0.5em;
}
#--re-frame-trace-- img {
border-style: none;
}
#--re-frame-trace-- option {
display: block;
}
#--re-frame-trace-- button,
#--re-frame-trace-- input,
#--re-frame-trace-- optgroup,
@ -84,14 +97,17 @@
padding: 3px 3px 1px 3px;
border: 1px solid #999999;
}
#--re-frame-trace-- button,
#--re-frame-trace-- input {
overflow: visible;
}
#--re-frame-trace-- button:focus,
#--re-frame-trace-- select:focus {
outline: #999999 dotted 1px;
}
#--re-frame-trace-- button,
#--re-frame-trace-- html [type="button"],
#--re-frame-trace-- [type="reset"],
@ -99,36 +115,45 @@
-webkit-appearance: button;
/* 2 */
}
#--re-frame-trace-- button:-moz-focusring,
#--re-frame-trace-- [type="button"]:-moz-focusring,
#--re-frame-trace-- [type="reset"]:-moz-focusring,
#--re-frame-trace-- [type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
#--re-frame-trace-- textarea {
overflow: auto;
}
#--re-frame-trace-- [type="checkbox"],
#--re-frame-trace-- [type="radio"] {
box-sizing: border-box;
}
#--re-frame-trace-- [type="number"]::-webkit-inner-spin-button,
#--re-frame-trace-- [type="number"]::-webkit-outer-spin-button {
height: auto;
}
#--re-frame-trace-- [type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
#--re-frame-trace-- ::-webkit-file-upload-button {
-webkit-appearance: button;
}
#--re-frame-trace-- [hidden] {
display: none;
}
#--re-frame-trace-- li {
display: block;
}
#--re-frame-trace-- button {
overflow: visible;
border: 0;
@ -137,11 +162,13 @@
background: none;
cursor: pointer;
}
#--re-frame-trace-- img {
max-width: 100%;
height: auto;
border: 0;
}
#--re-frame-trace-- table,
#--re-frame-trace-- thead,
#--re-frame-trace-- tbody,
@ -164,30 +191,38 @@
-webkit-border-horizontal-spacing: 0;
-webkit-border-vertical-spacing: 0;
}
#--re-frame-trace-- table {
display: table;
}
#--re-frame-trace-- th,
#--re-frame-trace-- td {
display: table-cell;
padding: 0 5px;
}
#--re-frame-trace-- tr {
display: table-row;
}
#--re-frame-trace-- thead {
display: table-header-group;
}
#--re-frame-trace-- tbody {
display: table-row-group;
}
#--re-frame-trace-- th,
#--re-frame-trace-- td {
display: table-cell;
}
#--re-frame-trace-- tr {
display: table-row;
}
#--re-frame-trace-- .label {
color: #8f8f8f;
background: #fafafa;
@ -196,130 +231,163 @@
margin: 10px 5px;
color: #222222;
}
#--re-frame-trace-- table {
width: 100%;
font-size: 14px;
}
#--re-frame-trace-- tbody {
color: #222222;
}
#--re-frame-trace-- thead {
font-weight: bold;
}
#--re-frame-trace-- tr th,
#--re-frame-trace-- tr td {
padding: 6px;
}
#--re-frame-trace-- tr th:first-child {
text-align: right;
}
#--re-frame-trace-- tr:nth-child(even) {
background: #fafafa;
}
#--re-frame-trace-- tr.trace--sub-create .trace--op {
color: #008766;
}
#--re-frame-trace-- tr.trace--sub-run .trace--op {
color: #762cff;
}
#--re-frame-trace-- tr.trace--event .trace--op {
color: #a66900;
}
#--re-frame-trace-- tr.trace--render .trace--op {
color: #007cc2;
}
#--re-frame-trace-- tr.trace--fsm-trigger .trace--op {
color: #284694;
}
#--re-frame-trace-- tr.trace--details {
color: #8f8f8f;
}
#--re-frame-trace-- tr.trace--details:hover,
#--re-frame-trace-- tr.trace--details:focus {
color: #5c5c5c;
}
#--re-frame-trace-- tr.trace--details:hover .trace--details-icon:before,
#--re-frame-trace-- tr.trace--details:focus .trace--details-icon:before {
color: #222222;
cursor: pointer;
content: "🖶";
}
#--re-frame-trace-- tr.trace--details:focus .trace--details-tags-text {
border-left: 1px dotted #999999;
padding-left: 7px;
}
#--re-frame-trace-- tr td.trace--toggle {
color: #a8a8a8;
padding: 0;
text-align: right;
}
#--re-frame-trace-- tr td.trace--toggle button:focus {
color: #222222;
outline: none;
}
#--re-frame-trace-- tr td.trace--op {
color: #8f8f8f;
padding-left: 0;
white-space: nowrap;
}
#--re-frame-trace-- tr td.trace--op-string {
word-break: break-all;
}
#--re-frame-trace-- tr td.trace--details-tags {
padding: 0;
cursor: pointer;
}
#--re-frame-trace-- tr td.trace--details-tags .trace--details-tags-text {
padding: 8px 5px;
padding-left: 8px;
margin-bottom: 5px;
}
#--re-frame-trace-- tr td.trace--meta {
color: #8f8f8f;
white-space: nowrap;
text-align: right;
}
#--re-frame-trace-- tr td .op-string {
cursor: pointer;
padding: 1px;
}
#--re-frame-trace-- tr td .op-string:hover {
border-bottom: 1px dotted #616cdb;
padding-bottom: 0;
}
#--re-frame-trace-- tr:hover .trace--toggle {
color: #222222;
}
#--re-frame-trace-- tr th:first-child,
#--re-frame-trace-- tr td:first-child {
padding-left: 7px;
}
#--re-frame-trace-- tr th:last-child,
#--re-frame-trace-- tr td:last-child {
padding-right: 7px;
}
#--re-frame-trace-- .button {
padding: 5px 5px 3px;
margin: 5px;
border-radius: 2px;
cursor: pointer;
}
#--re-frame-trace-- .text-button {
border-bottom: 1px dotted #888;
font-weight: normal;
}
#--re-frame-trace-- .text-button:focus {
outline: #999999 dotted 1px;
}
#--re-frame-trace-- .icon-button {
font-size: 10px;
}
#--re-frame-trace-- .popout-icon {
max-width: 15px;
cursor: pointer;
padding: 0 5px;
margin: 0 5px;
}
#--re-frame-trace-- .tab {
background: transparent;
border-radius: 0;
@ -330,17 +398,20 @@
padding-bottom: 4px;
vertical-align: bottom;
}
#--re-frame-trace-- .tab.active {
background: transparent;
border-bottom: 3px solid #808080;
border-radius: 0;
padding-bottom: 1px;
}
#--re-frame-trace-- ul.filter-items,
#--re-frame-trace-- .subtrees {
list-style-type: none;
margin: 0 5px;
}
#--re-frame-trace-- ul.filter-items .filter-item,
#--re-frame-trace-- .subtrees .filter-item,
#--re-frame-trace-- ul.filter-items .subtree-button,
@ -353,6 +424,7 @@
color: #222222;
display: inline-block;
}
#--re-frame-trace-- ul.filter-items .filter-item .filter-item-string,
#--re-frame-trace-- .subtrees .filter-item .filter-item-string,
#--re-frame-trace-- ul.filter-items .subtree-button .filter-item-string,
@ -360,12 +432,14 @@
color: #222222;
background: #ffff00;
}
#--re-frame-trace-- ul.filter-items .filter-item .subtree-button-string,
#--re-frame-trace-- .subtrees .filter-item .subtree-button-string,
#--re-frame-trace-- ul.filter-items .subtree-button .subtree-button-string,
#--re-frame-trace-- .subtrees .subtree-button .subtree-button-string {
color: #222222;
}
#--re-frame-trace-- ul.filter-items .filter-item:hover,
#--re-frame-trace-- .subtrees .filter-item:hover,
#--re-frame-trace-- ul.filter-items .subtree-button:hover,
@ -376,6 +450,7 @@
#--re-frame-trace-- .subtrees .subtree-button:focus {
text-decoration: line-through;
}
#--re-frame-trace-- .icon {
display: inline-block;
width: 1em;
@ -384,51 +459,61 @@
stroke: currentColor;
fill: currentColor;
}
#--re-frame-trace-- .icon-remove {
margin-left: 10px;
}
#--re-frame-trace-- .filter {
box-shadow: -7px 15px 6px -15px rgba(0, 0, 0, 0.3);
z-index: 1001;
}
#--re-frame-trace-- .filter .filter-control select {
border: none;
border-bottom: 1px solid #8f8f8f;
background: white;
display: inline-block;
font-family: 'courier new', monospace;
font-family: "courier new", monospace;
font-size: 1em;
padding: 2px 0 0 0;
-moz-appearance: menulist;
-webkit-appearance: menulist;
appearance: menulist;
}
#--re-frame-trace-- .filter .filter-control .filter-control-input {
border-bottom: 1px solid #8f8f8f;
display: inline-block;
}
#--re-frame-trace-- .filter .filter-control .filter-control-input:before {
display: inline-block;
color: #8f8f8f;
content: "⚲";
transform: rotate(-45deg);
}
#--re-frame-trace-- .filter .filter-control .filter-control-input input {
border: none;
}
#--re-frame-trace-- .filter-control-input {
display: flex;
flex: 0 0 auto;
}
#--re-frame-trace-- .nav {
background: #efeef1;
color: #222222;
}
#--re-frame-trace--.external-window {
display: flex;
height: 100%;
flex: 1 1 auto;
}
#--re-frame-trace-- .panel-content-scrollable {
padding-top: 20px;
display: flex;
@ -438,23 +523,29 @@
overflow-y: auto;
z-index: 1000;
}
#--re-frame-trace-- .tab-contents {
display: flex;
flex: 1 1 auto;
flex-direction: column;
}
#--re-frame-trace-- .filter-control {
margin: 10px 0 0 10px;
}
#--re-frame-trace-- .filter-items-count.active {
background: #ffff00;
}
#--re-frame-trace-- .filter-items-count.active:hover {
text-decoration: line-through;
}
#--re-frame-trace-- .filter-fields {
margin-top: 10px;
}
#--re-frame-trace-- .filter-category {
display: inline-block;
background: #efeef1;
@ -463,21 +554,26 @@
margin: 5px;
opacity: 0.3;
}
#--re-frame-trace-- .active {
opacity: 1;
}
#--re-frame-trace-- .re-frame-trace--object .toggle {
color: #8f8f8f;
cursor: pointer;
line-height: 1;
}
#--re-frame-trace-- .re-frame-trace--object > span {
vertical-align: text-top;
}
#--re-frame-trace-- .host-closed {
font-size: 4em;
background-color: rgba(255, 255, 0, 0.8);
}
#--re-frame-trace-- .expansion-button {
font-family: sans-serif;
width: 16px;

View File

@ -208,7 +208,7 @@
new-panel))))
(defn inject-devtools! []
(styles/inject-styles js/document)
(styles/inject-trace-styles js/document)
(r/render [devtools-outer utils.traces/traces {:panel-type :inline}] (panel-div)))
(defn init-db! []

View File

@ -43,7 +43,7 @@
(defn mount [popup-window popup-document]
(let [app (.getElementById popup-document "--re-frame-trace--")
doc js/document]
(styles/inject-styles popup-document)
(styles/inject-trace-styles popup-document)
(aset popup-window "onunload" #(rf/dispatch [:global/external-closed]))
(r/render
[(r/create-class

View File

@ -1,17 +1,337 @@
(ns day8.re-frame.trace.styles
(:require-macros [day8.re-frame.trace.utils.macros :as macros]))
(:require-macros [day8.re-frame.trace.utils.macros :as macros])
(:require [garden.core :as garden]
[garden.units :refer [em px percent]]
[garden.color :as color]
[garden.selectors :as s]
[cljs.spec.alpha :as spec]))
(def panel-styles (macros/slurp-macro "day8/re_frame/trace/main.css"))
(def background-blue "#e7f1ff")
(def background-gray "#a8a8a8")
(def background-gray-hint "#fafafa")
(def dark-green "#008766")
(def dark-gold "#A66900")
(def dark-purple "#762cff")
(def dark-blue "#284694")
(def dark-gray "gray")
(def dark-skyblue "#007CC2")
(def medium-gray "#999")
(def light-purple "#616cdb")
(def light-blue "lightblue")
(def light-gray "#efeef1")
(def yellow "yellow")
(def text-color "#222")
(def text-color-muted "#8f8f8f")
(defn inject-styles [document]
(let [id "--re-frame-trace-styles--"
styles-el (.getElementById document id)
new-styles-el (.createElement document "style")
new-styles panel-styles]
(def css-reset
[:#--re-frame-trace--
{:all "initial"}
[:*
{:all "unset"}]
;; /*! abridged from normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
{:line-height "1.15"
:font-size "12px"}
[:div :nav {:display "block"}]
[:pre {:font-family "monospace"
:font-size (em 1)}]
;; Text-level semantics
[(s/a) (s/a s/visited) {:color text-color
:border-bottom [[(px 1) "#333" "dotted"]]}]
[(s/a s/hover) (s/a s/focus) {:border-bottom [[(px 1) "#666666" "solid"]]}]
[:code {:font-family "monospace"
:font-size (em 1)}]
[:small {:font-size (percent 80)}]
[:sub :sup {:font-size (percent 75)
:line-height 0
:position "relative"
:vertical-align "baseline"}]
[:sub {:bottom (em -0.25)}]
[:sup {:top (em -0.5)}]
[:img {:border-style "none"}]
[:option {:display "block"}]
[:button :input :optgroup :select :textarea
{:font-family ["\"courier new\"" "monospace"]
:font-size (percent 100)
:padding [[(px 3) (px 3) (px 1) (px 3)]]
:border [[(px 1) "solid" medium-gray]]}]
[:button :input {:overflow "visible"}]
[:button :select [(s/& s/focus) {:outline [[medium-gray "dotted" (px 1)]]}]]
[:button
(s/html (s/attr= "type" "button"))
(s/attr= "type" "reset")
(s/attr= "type" "submit")
{:-webkit-appearance "button"}]
[:button:-moz-focusring
(s/attr= "type" "button")
;; Couldn't figure out // Restore the focus styles unset by the previous rule.
{:outline "1px dotted ButtonText"}]
[:textarea
{:overflow "auto"}]
;; Skipping IE 10-
[(s/attr= "type" "search") {:-webkit-appearance "textfield"
:outline-offset (px -2)}]
[:li {:display "block"}]
[:button {:overflow "visible"
:border 0
:-webkit-font-smoothing "inherit"
:letter-spacing "inherit"
:background "none"
:cursor "pointer"}]
[:img {:max-width (percent 100)
:height "auto"
:border "0"}]
[:table :thead :tbody :tfoot :tr :th :td
{:display "block"
:width "auto"
:height "auto"
:margin 0
:padding 0
:border "none"
:border-collapse "collapse"
:border-spacing 0
:border-color "inherit"
:vertical-align "inherit"
:text-align "left"
:font-weight "inherit"
:-webkit-border-horizontal-spacing 0
:-webkit-border-vertical-spacing 0}]
[:table {:display "table"}]
[:th :td {:display "table-cell"
:padding [[0 (px 5)]]}]
[:tr {:display "table-row"}]
[:thead {:display "table-header-group"}]
[:tbody {:display "table-row-group"}]
[:th :td {:display "table-cell"}]
[:tr {:display "table-row"}]])
(def label-mixin {:color text-color
:background background-gray-hint
:border [[(px 1) "solid" light-gray]]
:font-size (em 0.9)
:margin [[(px 10) (px 5)]]})
(def re-frame-trace-styles
[:#--re-frame-trace--
{:background "white"
:font-family ["'courier new'" "monospace"]
:color text-color}
[:.label label-mixin]
[s/table {:width (percent 100)
:font-size (px 14)}]
[s/tbody {:color text-color}]
[s/thead {:font-weight "bold"}]
[:tr
[:th :td {:padding (px 6)}]
[(s/th s/first-child) {:text-align "right"}]
[(s/& ".trace--trace") {}]
[(s/& ":nth-child(even)") {:background background-gray-hint}]
[(s/& ".trace--sub-create")
[".trace--op" {:color dark-green}]]
[(s/& ".trace--sub-run")
[".trace--op" {:color dark-purple}]]
[(s/& ".trace--event")
[".trace--op" {:color dark-gold}]]
[(s/& ".trace--render")
[".trace--op" {:color dark-skyblue}]]
[(s/& ".trace--fsm-trigger")
[".trace--op" {:color dark-blue}]]
[(s/& ".trace--details")
{:color text-color-muted}
[(s/& ":hover")
(s/& ":focus") {:color (color/darken text-color-muted 0.2)} ;; TODO: darken(color, 20);
[".trace--details-icon:before" {:color text-color
:cursor "pointer"
:content "\"🖶\""}]]
["&:focus"
[".trace--details-tags-text"
{:border-left [["1px" "dotted" medium-gray]]
:padding-left (px 7)}]]]
[:td
["&.trace--toggle"
{:color background-gray
:padding 0
:text-align "right"}
["button:focus"
{:color text-color
:outline "none"}]]
["&.trace--op"
{:color text-color-muted
:padding-left 0
:white-space "nowrap"}]
["&.trace--op-string"
{:word-break "break-all"}]
["&.trace--details-tags"
{:padding 0
:cursor "pointer"}
[".trace--details-tags-text"
{:padding "8px 5px 8px 8px"
:margin-bottom "5px"}]]
["&.trace--meta"
{:color text-color-muted
:white-space "nowrap"
:text-align "right"}]
[".op-string"
{:cursor "pointer"
:padding "1px"}
["&:hover"
{:border-bottom [[(px 1) "dotted" light-purple]]
:padding-bottom 0}]]]
["&:hover"
{".trace--toggle"
{:color text-color}}]
["th" "td"
["&:first-child" {:padding-left "7px"}]
["&:last-child" {:padding-right "7px"}]]]
[:.button {:padding "5px 5px 3px"
:margin "5px"
:border-radius "2px"
:cursor "pointer"}]
[:.text-button {:border-bottom "1px dotted #888"
:font-weight "normal"}
[(s/& s/focus) {:outline [[medium-gray "dotted" (px 1)]]}]]
[:.icon-button {:font-size "10px"}]
[:button.tab {}]
[:.popout-icon
{:max-width "15px"
:cursor "pointer"
:padding "0 5px"
:margin "0 5px"}]
[:.tab
{:background "transparent"
:border-radius 0
:text-transform "uppercase"
:font-family "monospace"
:letter-spacing "2px"
:margin-bottom 0
:padding-bottom "4px"
:vertical-align "bottom"}]
[:.tab.active
{:background "transparent"
:border-bottom [[(px 3) "solid" dark-gray]]
:border-radius 0
:padding-bottom (px 1)}]
[:ul.filter-items :.subtrees
{:list-style-type "none"
:margin "0 5px"}
[:.subtree-button :.filter-item
(merge {:display "inline-block"}
label-mixin)
[:.filter-item-string {:color text-color
:background yellow}]
[:.subtree-button-string {:color text-color}]
[(s/& s/hover) (s/& s/focus) {:text-decoration "line-through"}]]]
[:.icon {:display "inline-block"
:width (em 1)
:height (em 1)
:stroke-width 0
:stroke "currentColor"
:fill "currentColor"}]
[:.icon-remove {:margin-left (px 10)}]
[:.filter {:box-shadow "-7px 15px 6px -15px rgba(0, 0, 0, 0.3)"
:z-index 1001}
[:.filter-control
[:select {:border "none"
:border-bottom [[(px 1) "solid" text-color-muted]]
:background "white"
:display "inline-block"
:font-family "'courier new', monospace"
:font-size (em 1)
:padding "2px 0 0 0"
:-moz-appearance "menulist"
:-webkit-appearance "menulist"
:appearance "menulist"}]
[:.filter-control-input {:border-bottom [[(px 1) "solid" text-color-muted]]
:display "inline-block"}
[(s/& ":before") {:display "inline-block"
:color text-color-muted
:content "\"⚲\""
:transform "rotate(-45deg)"}]
[:input {:border "none"}]]]]
[:.filter-control-input
{:display "flex"
:flex "0 0 auto"}]
[:.nav {:background light-gray
:color text-color}]
[(s/& :.external-window) {:display "flex"
:height (percent 100)
:flex "1 1 auto"}]
[:.panel-content-top {}]
[:.panel-content-scrollable {:padding-top (px 20)
:display "flex"
:flex-direction "column"
:flex "1 1 auto"
:overflow-x "auto"
:overflow-y "auto"
:z-index 1000}]
[:.tab-contents {:display "flex"
:flex "1 1 auto"
:flex-direction "column"}]
[:.filter-control {:margin "10px 0 0 10px"}]
[:.filter-items-count
[(s/& ".active") {:background yellow}
[(s/& ":hover") {:text-decoration "line-through"}]]]
[:.filter-fields {:margin-top "10px"}]
[:.filter-category {:display "inline-block"
:background "#efeef1"
:cursor "pointer"
:padding "5px"
:margin "5px"
:opacity "0.3"}]
[:.active {:opacity 1}]
[:.re-frame-trace--object
[:.toggle {:color text-color-muted
:cursor "pointer"
:line-height 1}]
["> span" {:vertical-align "text-top"}]]
[:.host-closed {:font-size (em 4)
:background-color (color/rgba 255 255 0 0.8)}]
[:.expansion-button {:font-family "sans-serif"
:width (px 16)
:padding "0 2px"
:vertical-align "middle"}]
])
(def panel-styles (apply garden/css [css-reset re-frame-trace-styles]))
(js/console.log panel-styles)
;(def panel-styles (macros/slurp-macro "day8/re_frame/trace/main.css"))
(defn inject-style [document id style]
(let [styles-el (.getElementById document id)
new-styles-el (.createElement document "style")]
(.setAttribute new-styles-el "id" id)
(.setAttribute new-styles-el "type" "text/css")
(-> new-styles-el
(.-innerHTML)
(set! new-styles))
(set! style))
(if styles-el
(-> styles-el
(.-parentNode)
@ -19,3 +339,6 @@
(let []
(.appendChild (.-head document) new-styles-el)
new-styles-el))))
(defn inject-trace-styles [document]
(inject-style document "--re-frame-trace-styles--" panel-styles))