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
275 changes: 275 additions & 0 deletions Lib/profiling/sampling/flamegraph.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
body {
font-family:
"Source Sans Pro", "Lucida Grande", "Lucida Sans Unicode", "Geneva",
"Verdana", sans-serif;
margin: 0;
padding: 0;
background: #ffffff;
color: #2e3338;
line-height: 1.6;
}

.header {
background: linear-gradient(135deg, #3776ab 0%, #4584bb 100%);
color: white;
padding: 32px 0;
box-shadow: 0 2px 10px rgba(55, 118, 171, 0.2);
}

.header-content {
max-width: 1200px;
margin: 0 auto;
padding: 0 24px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}

.python-logo {
width: auto;
height: 64px;
margin-bottom: 16px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}

.python-logo img {
height: 64px;
width: auto;
filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.header-text h1 {
margin: 0;
font-size: 2.5em;
font-weight: 600;
color: white;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-text .subtitle {
margin: 8px 0 0 0;
font-size: 1.1em;
color: rgba(255, 255, 255, 0.9);
font-weight: 300;
}

.controls {
background: #f8f9fa;
border-bottom: 1px solid #e9ecef;
padding: 20px 0;
text-align: center;
}

.controls-content {
max-width: 1200px;
margin: 0 auto;
padding: 0 24px;
}

.controls button {
background: #3776ab;
color: white;
border: none;
padding: 12px 24px;
margin: 0 8px;
border-radius: 6px;
cursor: pointer;
font-weight: 600;
font-size: 14px;
font-family: inherit;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(55, 118, 171, 0.2);
}

.controls button:hover {
background: #2d5aa0;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(55, 118, 171, 0.3);
}

.controls button.secondary {
background: #ffd43b;
color: #2e3338;
}

.controls button.secondary:hover {
background: #ffcd02;
}

#chart {
width: 100%;
height: calc(100vh - 160px);
overflow: hidden;
background: #ffffff;
padding: 0 40px;
}

.d3-flame-graph rect {
stroke: rgba(55, 118, 171, 0.3) !important;
stroke-width: 1px !important;
cursor: pointer;
transition: all 0.1s ease;
}

.d3-flame-graph rect:hover {
stroke: #3776ab !important;
stroke-width: 2px !important;
filter: brightness(1.05);
}

.d3-flame-graph text {
font-family: "Source Sans Pro", sans-serif !important;
font-size: 12px !important;
font-weight: 500 !important;
fill: #2e3338 !important;
pointer-events: none !important;
}

.info-panel {
position: fixed;
bottom: 24px;
left: 84px; /* Leave space for the button */
background: white;
padding: 24px;
border-radius: 8px;
border: 1px solid #e9ecef;
font-size: 14px;
max-width: 280px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
z-index: 1000;
display: none;
}

.info-panel h3 {
margin: 0 0 16px 0;
color: #3776ab;
font-weight: 600;
font-size: 16px;
border-bottom: 2px solid #ffd43b;
padding-bottom: 8px;
}

.info-panel p {
margin: 12px 0;
color: #5a6c7d;
line-height: 1.5;
}

.info-panel strong {
color: #3776ab;
}

#show-info-btn {
position: fixed;
bottom: 32px;
left: 32px;
z-index: 1100;
width: 44px;
height: 44px;
border-radius: 50%;
background: #3776ab;
color: white;
border: none;
font-size: 24px;
box-shadow: 0 2px 8px rgba(55, 118, 171, 0.15);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
}

#show-info-btn:hover {
background: #2d5aa0;
}

#close-info-btn {
position: absolute;
top: 8px;
right: 12px;
background: none;
border: none;
font-size: 20px;
cursor: pointer;
color: #3776ab;
}

@media (max-width: 600px) {
#show-info-btn {
left: 8px !important;
bottom: 8px !important;
}
.info-panel {
left: 60px !important; /* Still leave space for button */
bottom: 8px !important;
max-width: 90vw !important;
}
}

.legend-panel {
position: fixed;
top: 24px;
left: 24px;
background: white;
padding: 24px;
border-radius: 8px;
border: 1px solid #e9ecef;
font-size: 14px;
max-width: 320px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
display: none;
z-index: 1001;
}

.legend-panel h3 {
margin: 0 0 20px 0;
color: #3776ab;
font-weight: 600;
font-size: 18px;
text-align: center;
border-bottom: 2px solid #ffd43b;
padding-bottom: 8px;
}

.legend-item {
display: flex;
align-items: center;
margin: 12px 0;
padding: 10px;
border-radius: 6px;
background: #f8f9fa;
border: 1px solid #e9ecef;
}

.legend-color {
width: 28px;
height: 18px;
border-radius: 4px;
margin-right: 16px;
border: 1px solid rgba(0, 0, 0, 0.1);
flex-shrink: 0;
}

.legend-label {
color: #2e3338;
font-weight: 600;
flex: 1;
}

.legend-description {
color: #5a6c7d;
font-size: 12px;
margin-top: 2px;
font-weight: 400;
}

.chart-container {
background: #ffffff;
margin: 0;
padding: 12px 0;
}
Loading
Loading