Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 23 additions & 34 deletions ui/src/assets/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@
content: $content;
}

@mixin button-base {
background: none;
color: inherit;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
outline: inherit;
user-select: none;
}

* {
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
Expand All @@ -76,9 +87,8 @@ html {
}
}

html,
body,
body > main {
.perfetto,
main.pf-ui-main {
height: 100%;
width: 100%;
padding: 0;
Expand All @@ -87,9 +97,16 @@ body > main {
overflow: hidden;
}

pre,
code {
font-family: var(--pf-font-monospace);
.perfetto {
h1,
h2,
h3 {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
padding: 0;
margin: 0;
}
}

// This is to minimize Mac vs Linux Chrome Headless rendering differences
Expand All @@ -99,20 +116,6 @@ body.testing {
font-kerning: none !important;
}

h1,
h2,
h3 {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
padding: 0;
margin: 0;
}
table {
-webkit-user-select: text;
user-select: text;
}

body.filedrag::after {
content: "Drop the trace file to open it";
position: fixed;
Expand All @@ -128,17 +131,3 @@ body.filedrag::after {
color: #333;
background: rgba(255, 255, 255, 0.5);
}

button {
background: none;
color: inherit;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
outline: inherit;
}

button.close {
font-family: var(--pf-font-monospace);
}
5 changes: 4 additions & 1 deletion ui/src/assets/cookie_consent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
}

button {
@include button-base;

padding: 10px;
border-radius: 3px;
color: #fff;
Expand All @@ -42,7 +44,8 @@
}
}
button:hover {
@include button-base;

background-color: #373f4b;
cursor: pointer;
}
}
2 changes: 2 additions & 0 deletions ui/src/assets/perf_monitor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
background-color: rgba(27, 28, 29, 0.9);

button {
@include button-base;

text-decoration: underline;
color: hsl(45, 100%, 48%);
&:hover {
Expand Down
3 changes: 2 additions & 1 deletion ui/src/assets/widgets/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
}

.pf-button {
@include button-base;

font-family: var(--pf-font-compact);
line-height: 1;
user-select: none;
border-radius: $border-radius;
padding: 4px 8px;
white-space: nowrap;
Expand Down
4 changes: 2 additions & 2 deletions ui/src/assets/widgets/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
margin: 4px 0;

.pf-menu-item {
@include button-base;

font-family: var(--pf-font-compact);
user-select: none;
text-align: left;
padding: 6px 10px;
white-space: nowrap;
min-width: max-content;
line-height: 1;
cursor: pointer;

display: grid;
grid-template-columns: auto 1fr auto;
Expand Down
1 change: 1 addition & 0 deletions ui/src/frontend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ function onCssLoaded() {
// Clear all the contents of the initial page (e.g. the <pre> error message)
// And replace it with the root <main> element which will be used by mithril.
document.body.innerHTML = '';
document.body.classList.add('perfetto');

const pages = AppImpl.instance.pages;
pages.registerPage({route: '/', render: () => m(HomePage)});
Expand Down
Loading