.dcss-solve-turning-point
Finds where your formula peaks or dips, where its slope is 0.
Example
Result
Markup
<link rel="stylesheet" href="dcss.css">
<link rel="stylesheet" href="families/format.css">
<link rel="stylesheet" href="families/math.css">
<div class="dcss-solve dcss-solve-turning-point tp" style="--from: 0; --to: 1"><i><i><i><i><i><i><i><i><i><i><i><i>
<output class="dcss-format-fixed" style="--value: var(--dcss-solve); --precision: 3"></output></i></i></i></i></i></i></i></i></i></i></i></i>
</div>
CSS
.tp i { --dcss-formula: calc(2 - (var(--dcss-input) - 0.3) * (var(--dcss-input) - 0.3)); --dcss-slope: calc(-2 * (var(--dcss-input) - 0.3)); }
Notes
Each call takes your own formula, written once as --dcss-formula in terms of --dcss-input. A .dcss-solve with data-dcss-steps="n" halves the range n times, one nested element a step, and BASICSS writes those elements for you: npx basicss page.html -o built.html.
Browser support
| Browser | Support |
|---|---|
| Chrome | Yes |
| Safari | Yes |
| Firefox | Whole numbers only |