Skip to content

Commit

Permalink
feature(#261): style button
Browse files Browse the repository at this point in the history
  • Loading branch information
micmro committed Oct 7, 2019
1 parent 60df175 commit e07da5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/css-raw/perf-cascade.css
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,17 @@
.info-overlay-holder button:hover {border-color: rgba(255,255,255, 0.6);}
.info-overlay-holder button.active {border-color: #fff; cursor: default;}
.info-overlay-holder button.active:focus {border-color: rgba(255,255,255, 0.8);}
.info-overlay-holder button.copy-raw-data {position: absolute; top:0.5em; right: 0.5em; border: 0; margin: 0; border-radius: 1em; background: #e0e0e0;}
.info-overlay-holder button.copy-raw-data:focus,
.info-overlay-holder button.copy-raw-data:hover { background: #ccc; }

/* Info overlay HTML - content */
.info-overlay-holder dt {float: left; clear: both; margin-top: 0.5em; width: 25%; text-align: right; font-weight: bold; }
.info-overlay-holder dd {float: left; width:73%; margin: 0.5em 0 0 2%; padding: 0 0 0.5em 0;}
.info-overlay-holder dt:after { content: ":"; }
.info-overlay-holder pre {font-size: 11px; line-height: 23px; border-radius: 0; background: #f6f3f3;}

.info-overlay-holder .tab {float: left; width:100%; height: 350px; padding:12px 12px 24px;}
.info-overlay-holder .tab {float: left; position: relative; width:100%; height: 350px; padding:12px 12px 24px;}
.info-overlay-holder .tab h2 {font-size: 1.2em; margin:0.5em 0 0; padding: 0.5em 0 0.5em 1em; clear: both; border-top: solid 1px #efefef;}
.info-overlay-holder .tab h2:first-child {border-top: 0; padding-top: 0;}
.info-overlay-holder .tab pre {overflow-y: hidden; width:100%; min-height: 100%;}
Expand Down
3 changes: 1 addition & 2 deletions src/ts/waterfall/details-overlay/svg-details-overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ function createHolder(y: number, detailsHeight: number) {
const onRawDataCopyClick = (event: MouseEvent) => {
const btn = event.target as HTMLButtonElement;
if (btn.tagName.toLowerCase() === "button" && btn.classList.contains("copy-raw-data")) {
const data = btn.nextElementSibling ? (btn.nextElementSibling as HTMLElement).innerText : "";
const el = document.createElement("textarea");
el.value = data;
el.value = btn.nextElementSibling ? (btn.nextElementSibling as HTMLElement).innerText : "";
document.body.appendChild(el);
el.select();
el.setSelectionRange(0, 99999);
Expand Down

0 comments on commit e07da5f

Please sign in to comment.