Spaces:
Running
Running
Download static/css/reports.css from Arrechenash/stocks: direct link, hf CLI and curl.
- Browser
- Download file 15.5 kB
-
https://huggingface.co/spaces/Arrechenash/stocks/resolve/main/static/css/reports.css
- Command line
-
hf download hf://spaces/Arrechenash/stocks/static/css/reports.css
-
curl -L -o reports.css https://huggingface.co/spaces/Arrechenash/stocks/resolve/main/static/css/reports.css
15.5 kB
| /* βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| Reports page β styles | |
| The page measures one session and lists the candidates a filter selected, | |
| so it is a controls strip, a funnel and a table. The funnel and the table | |
| are the page's own components; everything else reuses common.css | |
| (control-panel, .btn, .input-field, .filter-textarea, .stock-row). | |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| /* ββ Controls strip ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| The scanner puts its filter textarea directly in .control-panel__main so | |
| the textarea, the help button and Run share one baseline. Nesting the | |
| textarea in a .input-group (a column) put the help button on its own row | |
| under the label and left the Run button floating beside a two-row-tall | |
| group, so the strip is laid out here instead. Only dimensions and | |
| placement are set: the panel, the fields and the buttons are common.css's. */ | |
| .reports-controls { | |
| display: grid; | |
| grid-template-columns: 1fr auto; | |
| grid-template-areas: | |
| "filter filter" | |
| "session run" | |
| "plan plan"; | |
| gap: var(--space-sm) var(--space-sm); | |
| align-items: center; | |
| } | |
| .reports-controls__filterwrap { | |
| grid-area: filter; | |
| min-width: 0; | |
| } | |
| /* The label and the help link share one row above the filter, so the help is | |
| named where the reader is looking rather than floating beside the box. */ | |
| .reports-controls__filterhead { | |
| display: flex; | |
| align-items: baseline; | |
| justify-content: space-between; | |
| gap: var(--space-sm); | |
| margin-bottom: var(--space-xs); | |
| } | |
| .reports-controls__filterhead .reports-controls__label { | |
| margin-bottom: 0; | |
| } | |
| .reports-controls__help { | |
| color: var(--accent); | |
| font-size: var(--font-xs); | |
| text-decoration: underline; | |
| text-underline-offset: var(--radius-sm); | |
| } | |
| .reports-controls__help:hover { | |
| color: var(--text); | |
| } | |
| .reports-controls__filter { | |
| width: 100%; | |
| min-width: 0; | |
| } | |
| .reports-controls__session { | |
| grid-area: session; | |
| justify-self: start; | |
| } | |
| /* The date field is a fixed-format control: stretched to the grid's 1fr track | |
| it became a 1100px input around a 10-character date. */ | |
| .reports-controls__session .input-field { | |
| width: auto; | |
| } | |
| .reports-controls__run { | |
| grid-area: run; | |
| justify-self: end; | |
| white-space: nowrap; | |
| } | |
| /* The trade, below the filter strip. It is a second row of the same grid | |
| rather than its own panel: the entry expression is the same language as the | |
| filter above it, and putting the two in one column says so before anyone | |
| reads a label. Entry takes the wide track because it is the one field | |
| holding an expression rather than a number. */ | |
| .reports-controls__plan { | |
| grid-area: plan; | |
| grid-column: 1 / -1; | |
| display: grid; | |
| grid-template-columns: repeat(4, minmax(72px, 1fr)); | |
| gap: var(--space-sm); | |
| align-items: end; | |
| padding-top: var(--space-sm); | |
| border-top: 1px solid var(--border); | |
| } | |
| /* The four exits are one group, so the units in their labels read as a set. | |
| It takes the full plan row; the break-even box sits on the row below it. */ | |
| .reports-controls__exits { | |
| grid-column: 1 / -1; | |
| display: grid; | |
| grid-template-columns: repeat(4, minmax(72px, 1fr)); | |
| gap: var(--space-sm); | |
| align-items: end; | |
| } | |
| /* Entry and the trigger take a row each: both hold an expression rather than | |
| a number, and both are the two halves of one sentence -- what the order | |
| rests on, and which bars are allowed to fill it. */ | |
| .reports-controls__field--wide { | |
| grid-column: 1 / -1; | |
| } | |
| .reports-controls__field { | |
| display: flex; | |
| flex-direction: column; | |
| min-width: 0; | |
| } | |
| .reports-controls__field .input-field { | |
| width: 100%; | |
| font-family: var(--font-mono); | |
| font-size: var(--font-xs); | |
| } | |
| /* The label sits above the field, as it does for the filter and the date. */ | |
| .reports-controls__field .reports-controls__label { | |
| margin-bottom: var(--space-xs); | |
| } | |
| /* Its own row under the exits, so it can never run past the card's edge. */ | |
| .reports-controls__be { | |
| grid-column: 1 / -1; | |
| display: flex; | |
| align-items: center; | |
| gap: var(--space-xs); | |
| font-size: var(--font-xs); | |
| color: var(--text-muted); | |
| cursor: pointer; | |
| } | |
| /* The label sits above the field, so it is a caption on the grid rather than | |
| a flex child of it: as a grid item it cannot stretch the field's height. */ | |
| .reports-controls__label { | |
| display: block; | |
| font-size: var(--font-xs); | |
| color: var(--text-muted); | |
| text-transform: uppercase; | |
| letter-spacing: 0.05em; | |
| font-weight: 600; | |
| margin-bottom: var(--space-xs); | |
| } | |
| .reports-controls__session-field { | |
| display: block; | |
| } | |
| /* On a phone the two-column grid puts a 44px textarea and a 34px date input | |
| in the same column, which is narrower than either wants. Stacked full width | |
| is the layout the scanner falls back to at the same tier. */ | |
| @media (width <= 480px) { | |
| /* The "Filter syntax" link is a 15px-tall text button; the audit's 28px touch | |
| floor, on the shared filter help (backtest screener and reports). */ | |
| .reports-controls__help { | |
| display: inline-flex; | |
| align-items: center; | |
| min-height: var(--touch-floor); | |
| } | |
| .reports-controls { | |
| grid-template-columns: 1fr; | |
| grid-template-areas: | |
| "filter" | |
| "session" | |
| "run" | |
| "plan"; | |
| } | |
| .reports-controls__session, | |
| .reports-controls__run { | |
| justify-self: stretch; | |
| } | |
| .reports-controls__plan, | |
| .reports-controls__exits { | |
| grid-template-columns: repeat(2, minmax(0, 1fr)); | |
| } | |
| } | |
| /* ββ Funnel ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| Four counts that fall as the study narrows. A number alone does not say | |
| "46 of 46"; each step carries its share of the filter's universe as a | |
| bar, so the drop-off is read without doing the division. */ | |
| .reports-funnel { | |
| display: grid; | |
| grid-template-columns: repeat(4, minmax(0, 1fr)); | |
| gap: var(--space-sm); | |
| margin-bottom: var(--space-md); | |
| } | |
| .reports-funnel__step { | |
| /* Surface from .surface (common.css); the rule owns the cell's padding. */ | |
| padding: var(--space-sm) var(--space-md); | |
| min-width: 0; | |
| } | |
| .reports-funnel__value { | |
| font-size: var(--font-lg); | |
| font-weight: 700; | |
| color: var(--text); | |
| line-height: 1.2; | |
| font-variant-numeric: tabular-nums; | |
| } | |
| .reports-funnel__label { | |
| font-size: var(--font-xs); | |
| color: var(--text-muted); | |
| text-transform: uppercase; | |
| letter-spacing: 0.05em; | |
| font-weight: 600; | |
| margin-top: var(--space-2xs); | |
| } | |
| /* The track is always drawn, even at 100%: a bar that appears only when a | |
| step loses names makes the first step look like the exception. */ | |
| .reports-funnel__track { | |
| height: var(--space-xs); | |
| margin-top: var(--space-sm); | |
| background: var(--bg); | |
| border-radius: var(--radius-sm); | |
| overflow: hidden; | |
| } | |
| .reports-funnel__fill { | |
| display: block; | |
| height: 100%; | |
| background: var(--accent); | |
| border-radius: var(--radius-sm); | |
| } | |
| @media (width <= 768px) { | |
| .reports-funnel { | |
| grid-template-columns: repeat(2, minmax(0, 1fr)); | |
| } | |
| } | |
| /* ββ Provenance line ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| The filter that produced the numbers, and the rules they were measured | |
| under, in one dimmed line under the funnel. It is the audit trail: without | |
| it the table below is a list of prices with no stated origin. */ | |
| .reports-provenance { | |
| font-size: var(--font-sm); | |
| color: var(--text-muted); | |
| margin-bottom: var(--space-md); | |
| line-height: 1.5; | |
| } | |
| .reports-provenance__filter { | |
| font-family: var(--font-mono); | |
| font-size: var(--font-xs); | |
| color: var(--text); | |
| background: var(--bg-elevated); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius-sm); | |
| padding: 1px var(--space-xs); | |
| overflow-wrap: anywhere; | |
| } | |
| /* ββ Candidates table ββββββββββββββββββββββββββββββββββββββββββββββββ | |
| Rows, not cards: a session measures dozens of names and the comparison | |
| between them is the point, so every row is one line of aligned numbers | |
| with the intraday path as a trailing sparkline. The track list is a custom | |
| property so the header and the rows cannot drift apart β the same | |
| arrangement the scanner's list uses. */ | |
| .reports-table { | |
| --reports-cols: 64px 76px 58px minmax(170px, 1.4fr) 58px 72px minmax(130px, 1fr) auto; | |
| } | |
| /* The legs of one position. Each is its own span so the label and the share | |
| can be coloured by what the leg was -- a target, a stop, or the end of the | |
| session -- which is the difference between "half the position was taken at | |
| TP1 and the rest gave it back" and a single red number. */ | |
| .reports-table__exits { | |
| display: flex; | |
| align-items: baseline; | |
| gap: var(--space-xs); | |
| min-width: 0; | |
| overflow: hidden; | |
| white-space: nowrap; | |
| } | |
| .reports-table__leg { | |
| font-variant-numeric: tabular-nums; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .reports-table__leg--target { | |
| color: var(--positive); | |
| } | |
| .reports-table__leg--stop { | |
| color: var(--negative); | |
| } | |
| .reports-table__leg--end { | |
| color: var(--text-muted); | |
| } | |
| .reports-table__leg-sep { | |
| color: var(--text-dim); | |
| flex-shrink: 0; | |
| } | |
| .reports-table__head { | |
| display: grid; | |
| grid-template-columns: var(--reports-cols); | |
| gap: var(--space-sm); | |
| align-items: center; | |
| padding: 0 var(--space-sm) var(--space-xs); | |
| font-size: var(--font-xs); | |
| color: var(--text-muted); | |
| text-transform: uppercase; | |
| letter-spacing: 0.05em; | |
| font-weight: 600; | |
| border-bottom: 1px solid var(--border); | |
| margin-bottom: var(--space-xs); | |
| } | |
| .reports-table__row { | |
| display: grid; | |
| grid-template-columns: var(--reports-cols); | |
| gap: var(--space-sm); | |
| align-items: center; | |
| padding: var(--space-sm); | |
| font-size: var(--font-sm); | |
| border-bottom: 1px solid var(--border); | |
| transition: background var(--transition-fast); | |
| } | |
| .reports-table__row:hover { | |
| background: var(--bg-elevated); | |
| } | |
| .reports-table__row:last-child { | |
| border-bottom: none; | |
| } | |
| /* Tabular figures in every numeric cell: the columns are read vertically, | |
| and proportional digits make 11.0 and 8.0 different widths in the same | |
| place, so the eye has to re-anchor on each row. */ | |
| .reports-table__num { | |
| text-align: right; | |
| font-variant-numeric: tabular-nums; | |
| white-space: nowrap; | |
| } | |
| /* The hand-off to the two surfaces that answer a different question about | |
| this same ticker. Sits last and takes only the width its labels need, so | |
| the measured columns keep their tracks. */ | |
| .reports-table__next { | |
| display: flex; | |
| gap: var(--space-sm); | |
| white-space: nowrap; | |
| } | |
| .reports-table__next a { | |
| color: var(--text-muted); | |
| text-decoration: none; | |
| font-size: var(--font-xs); | |
| } | |
| .reports-table__next a:hover { | |
| color: var(--accent); | |
| text-decoration: underline; | |
| } | |
| .reports-table__symbol { | |
| font-weight: 600; | |
| color: var(--text); | |
| white-space: nowrap; | |
| } | |
| .reports-table__pnl { | |
| font-weight: 700; | |
| } | |
| .reports-table__pnl--positive { | |
| color: var(--positive); | |
| } | |
| .reports-table__pnl--negative { | |
| color: var(--negative); | |
| } | |
| .reports-table__reason { | |
| color: var(--text-muted); | |
| font-size: var(--font-xs); | |
| text-transform: uppercase; | |
| letter-spacing: 0.04em; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .reports-table__chart { | |
| min-width: 0; | |
| line-height: 0; | |
| } | |
| /* A fixed 44px band, not the viewBox's own aspect: the column is the | |
| flexible one, so letting the 320x90 viewBox scale proportionally made each | |
| row 213px tall on a 1400px screen and the table stopped being a table. The | |
| SVG stretches to fill (see preserveAspectRatio in the markup) and its | |
| strokes opt out of the transform, so it reads as a sparkline at any width. */ | |
| .reports-table__chart svg { | |
| display: block; | |
| width: 100%; | |
| height: var(--touch-min); | |
| } | |
| /* Below the tablet cut the seven columns overflow a phone, and the two that | |
| carry the trade's shape β when it filled and how it closed β are the ones | |
| a reader on a phone can least afford to lose to a scrollbar. The sparkline | |
| goes instead: the numbers are the record, the path is the illustration. */ | |
| @media (width <= 768px) { | |
| .reports-table { | |
| --reports-cols: 56px 68px minmax(120px, 1fr) 68px 68px; | |
| } | |
| .reports-table__head > :nth-child(3), | |
| .reports-table__row > :nth-child(3), | |
| .reports-table__head > :nth-child(5), | |
| .reports-table__row > :nth-child(5), | |
| .reports-table__chart, | |
| .reports-table__next { | |
| display: none; | |
| } | |
| } | |
| /* A phone leaves 358px of content width (390 less the wrapper's 16px each | |
| side). The four surviving tracks and their three 8px gaps have to fit inside | |
| it, so they are sized to the widest value each column actually holds: | |
| "$310.60" for a price and "-1.0%" for a P&L, with the exits cell taking | |
| what is left. At the tablet sizes the same tracks measured 36px past the | |
| viewport. */ | |
| @media (width <= 480px) { | |
| .reports-table { | |
| --reports-cols: 52px 62px minmax(96px, 1fr) 58px; | |
| } | |
| } | |
| /* ββ Legend βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| The path draws three levels that are otherwise unlabelled lines. The | |
| legend is one row under the funnel, so it is read once rather than | |
| decoded per row. */ | |
| .reports-legend { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: var(--space-sm) var(--space-md); | |
| font-size: var(--font-xs); | |
| color: var(--text-muted); | |
| margin-bottom: var(--space-md); | |
| } | |
| .reports-legend__item { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--space-xs); | |
| } | |
| .reports-legend__swatch { | |
| width: 14px; | |
| height: 0; | |
| border-top-width: var(--radius-sm); | |
| border-top-style: dashed; | |
| flex-shrink: 0; | |
| } | |
| .reports-legend__swatch--target { | |
| border-top-color: var(--positive); | |
| } | |
| .reports-legend__swatch--level { | |
| border-top-color: var(--warning); | |
| } | |
| .reports-legend__swatch--stop { | |
| border-top-color: var(--negative); | |
| } | |
| /* The trade is the one part of the path that carries the outcome: the bars | |
| from the fill to the exit are drawn in the trade's own colour and everything | |
| around them in the neutral tone, so a stop reads as "the line turned red | |
| here and never came back". The swatch is both colours, because the legend | |
| is written once for a column where some rows won and some did not. */ | |
| .reports-legend__swatch--trade { | |
| height: 3px; | |
| border-top: 0; | |
| background: linear-gradient(90deg, var(--negative), var(--positive)); | |
| } | |
| /* The two polylines are the path itself, not levels: one weight for the | |
| premarket, a heavier one for the session, which is where the fill and the | |
| exit happened. */ | |
| .reports-legend__swatch--premarket { | |
| border-top: var(--radius-sm) solid var(--text-dim); | |
| } | |
| .reports-legend__swatch--session { | |
| border-top: var(--radius-sm) solid var(--text); | |
| } | |
| /* The fill and the exit are vertical rules on the path, so their swatches | |
| stand on end rather than lying down. */ | |
| .reports-legend__swatch--fill, | |
| .reports-legend__swatch--exit { | |
| width: 0; | |
| height: var(--space-sm-plus); | |
| border-top: 0; | |
| border-left: var(--radius-sm) dashed; | |
| } | |
| .reports-legend__swatch--fill { | |
| border-left-color: var(--warning); | |
| } | |
| .reports-legend__swatch--exit { | |
| border-left-color: var(--positive); | |
| } | |