Stage 1 - outline button
- CSS fallback must be used
- To reduce specificity
- User need not know the implementation (like have we uses css class, id or element )
- Private variables approach
--_color: black @propertyand initial value- Con - It will be global fallback
--coloris too generic to provide as fallback
Stage 2 - glossy button
- Space toggle technique
--glossy:provide space as a value to the variable is valid--glossy: var(--On)should toggle glossy from CSS without JS- Technique works cause of invalid value at computed time (ivct)
- invct makes properties
unset unsetrefer to- inherit properties becomes
inherit - other properties becomes
initial
- Good for upcoming properties
@supportswith properties like future color gamutoklab
_4button {_4 --glossy: ;_4 background: var(--glossy, pink); // background is unset_4}
_9:root {_9 --ON: ;_9 --OFF: initial; // initial value triggers fallback_9 --glossy: var(--ON);_9}_9_9button {_9 background: var(--glossy, pink); // background is unset_9}
Stage 3 - Bar graph
- Couter reset technique
- Integer (number with decimal point) does not work with counters
@propertycould create number -> integer converter- Which rounds the
%in bar - Future
round()in css &text() - works with
min()& I thought clamp could help - mapping one range to another
[0, 100] -> [100px, 250px]- needs math formula - Color changing of the bar is done mapping range of
huevalue - number -> unit easy but reverse is not possible
- future divide by unit
var(--width) / 1px - Conditials
Stage 4 - Final act
@ragavkumarv
swipe to next ➡️
