branchsbox/css-better-autogencancel

21 Commits over 31 Days - 0.03cph!

8 Months Ago
Turn BaseStyles members into a table containing type, default value, and inheritance state, generate BaseStyles.Defaults Auto-generate layout cascading based on inheritance state Use BaseStyles.Default instead of hardcoding defaults Similar to `css-defaults` branch but this does it better - so I'm deleting that in favour of this. Rather than hard-coding the default value every time we fetch it: ```cs var value = Styles.BackgroundColor ?? Color.White; ``` We should be doing something like: ```cs var value = Styles.BackgroundColor ?? Default.BackgroundColor; ``` Provide default values as fallbacks for style transitions, use LerpProperty inside BaseStyles.FromLerp In FromLerp, check if the property we're trying to change is actually changing Prevents us from stomping property changes when a transition is running with `transition: all` if you have an animation running simulataneously Move default styles into `DefaultStyles`, make everything readonly VirtualScrollPanel uses DefaultStyles Only use fallback inside Lerp functions if from/to are null Move null checks into Lerp functions, remove logs Tidy up, use same code path for lerps Refer to default values in docstrings, inherited/cascading values lerp to their initial `from` values if `to` is unset Merge fixes, Name -> TypeName Generate FillDefaults() function, call inside PreLayout.BuildFinal, add Length.Undefined Fix a bunch of defaults (need better way to check if a property is set tho) Add `Style.IsDefault( name )` Bad idea to call FillDefaults here since it will stomp previous keyframes backdrop-filter-hueRotate is backdrop-filter-hue-rotate (oops) mask-position defaults to 0,0 Use IsDefault when necessary inside tests (HasValue will always be true for ComputedStyle properties), only check where necessary (i.e. if we're not also checking the value itself) Scrolling fixes Remove DefaultStyles, internalize IsDefault, FillDefaults, ApplyCascading Handle `overflow` prop defaults separately Use HasScrollY inside panel input Get rid of remaining null coalescing shit - ComputedStyle properties are no longer null ComputedStyles has its own class w/ no nullables, helps clean things up Remove unused, clean up
8 Months Ago
8 Months Ago
Turn BaseStyles members into a table containing type, default value, and inheritance state, generate BaseStyles.Defaults Auto-generate layout cascading based on inheritance state Use BaseStyles.Default instead of hardcoding defaults Similar to `css-defaults` branch but this does it better - so I'm deleting that in favour of this. Rather than hard-coding the default value every time we fetch it: ```cs var value = Styles.BackgroundColor ?? Color.White; ``` We should be doing something like: ```cs var value = Styles.BackgroundColor ?? Default.BackgroundColor; ``` Provide default values as fallbacks for style transitions, use LerpProperty inside BaseStyles.FromLerp In FromLerp, check if the property we're trying to change is actually changing Prevents us from stomping property changes when a transition is running with `transition: all` if you have an animation running simulataneously Move default styles into `DefaultStyles`, make everything readonly VirtualScrollPanel uses DefaultStyles Only use fallback inside Lerp functions if from/to are null Move null checks into Lerp functions, remove logs Tidy up, use same code path for lerps Refer to default values in docstrings, inherited/cascading values lerp to their initial `from` values if `to` is unset Merge fixes, Name -> TypeName Generate FillDefaults() function, call inside PreLayout.BuildFinal, add Length.Undefined Fix a bunch of defaults (need better way to check if a property is set tho) Add `Style.IsDefault( name )` Bad idea to call FillDefaults here since it will stomp previous keyframes backdrop-filter-hueRotate is backdrop-filter-hue-rotate (oops) mask-position defaults to 0,0 Use IsDefault when necessary inside tests (HasValue will always be true for ComputedStyle properties), only check where necessary (i.e. if we're not also checking the value itself) Scrolling fixes Remove DefaultStyles, internalize IsDefault, FillDefaults, ApplyCascading Handle `overflow` prop defaults separately Use HasScrollY inside panel input Get rid of remaining null coalescing shit - ComputedStyle properties are no longer null ComputedStyles has its own class w/ no nullables, helps clean things up Remove unused, clean up
8 Months Ago
Remove unused, clean up
8 Months Ago
ComputedStyles has its own class w/ no nullables, helps clean things up
8 Months Ago
Get rid of remaining null coalescing shit - ComputedStyle properties are no longer null
8 Months Ago
Use HasScrollY inside panel input
8 Months Ago
Handle `overflow` prop defaults separately
8 Months Ago
Remove DefaultStyles, internalize IsDefault, FillDefaults, ApplyCascading
8 Months Ago
Scrolling fixes
8 Months Ago
backdrop-filter-hueRotate is backdrop-filter-hue-rotate (oops) mask-position defaults to 0,0 Use IsDefault when necessary inside tests (HasValue will always be true for ComputedStyle properties), only check where necessary (i.e. if we're not also checking the value itself)
8 Months Ago
Add `Style.IsDefault( name )` Bad idea to call FillDefaults here since it will stomp previous keyframes
8 Months Ago
Fix a bunch of defaults (need better way to check if a property is set tho)
8 Months Ago
Generate FillDefaults() function, call inside PreLayout.BuildFinal, add Length.Undefined
8 Months Ago
Turn BaseStyles members into a table containing type, default value, and inheritance state, generate BaseStyles.Defaults Auto-generate layout cascading based on inheritance state Use BaseStyles.Default instead of hardcoding defaults Similar to `css-defaults` branch but this does it better - so I'm deleting that in favour of this. Rather than hard-coding the default value every time we fetch it: ```cs var value = Styles.BackgroundColor ?? Color.White; ``` We should be doing something like: ```cs var value = Styles.BackgroundColor ?? Default.BackgroundColor; ``` Provide default values as fallbacks for style transitions, use LerpProperty inside BaseStyles.FromLerp In FromLerp, check if the property we're trying to change is actually changing Prevents us from stomping property changes when a transition is running with `transition: all` if you have an animation running simulataneously Move default styles into `DefaultStyles`, make everything readonly VirtualScrollPanel uses DefaultStyles Only use fallback inside Lerp functions if from/to are null Move null checks into Lerp functions, remove logs Tidy up, use same code path for lerps Refer to default values in docstrings, inherited/cascading values lerp to their initial `from` values if `to` is unset Merge fixes, Name -> TypeName
9 Months Ago
Turn BaseStyles members into a table containing type, default value, and inheritance state, generate BaseStyles.Defaults Auto-generate layout cascading based on inheritance state Use BaseStyles.Default instead of hardcoding defaults Similar to `css-defaults` branch but this does it better - so I'm deleting that in favour of this. Rather than hard-coding the default value every time we fetch it: ```cs var value = Styles.BackgroundColor ?? Color.White; ``` We should be doing something like: ```cs var value = Styles.BackgroundColor ?? Default.BackgroundColor; ``` Provide default values as fallbacks for style transitions, use LerpProperty inside BaseStyles.FromLerp In FromLerp, check if the property we're trying to change is actually changing Prevents us from stomping property changes when a transition is running with `transition: all` if you have an animation running simulataneously Move default styles into `DefaultStyles`, make everything readonly VirtualScrollPanel uses DefaultStyles Only use fallback inside Lerp functions if from/to are null Move null checks into Lerp functions, remove logs Tidy up, use same code path for lerps Refer to default values in docstrings, inherited/cascading values lerp to their initial `from` values if `to` is unset Merge fixes, Name -> TypeName
9 Months Ago
Refer to default values in docstrings, inherited/cascading values lerp to their initial `from` values if `to` is unset
9 Months Ago
Tidy up, use same code path for lerps
9 Months Ago
Only use fallback inside Lerp functions if from/to are null Move null checks into Lerp functions, remove logs
9 Months Ago
VirtualScrollPanel uses DefaultStyles
9 Months Ago
Turn BaseStyles members into a table containing type, default value, and inheritance state, generate BaseStyles.Defaults Auto-generate layout cascading based on inheritance state Use BaseStyles.Default instead of hardcoding defaults Similar to `css-defaults` branch but this does it better - so I'm deleting that in favour of this. Rather than hard-coding the default value every time we fetch it: ```cs var value = Styles.BackgroundColor ?? Color.White; ``` We should be doing something like: ```cs var value = Styles.BackgroundColor ?? Default.BackgroundColor; ``` Provide default values as fallbacks for style transitions, use LerpProperty inside BaseStyles.FromLerp In FromLerp, check if the property we're trying to change is actually changing Prevents us from stomping property changes when a transition is running with `transition: all` if you have an animation running simulataneously Move default styles into `DefaultStyles`, make everything readonly