diff options
| author | Henry Jameson <me@hjkos.com> | 2024-02-12 19:58:42 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2024-02-12 19:58:42 +0200 |
| commit | 17b25ef0e0eb261fbfd09be740a1cd8c0e3ad88b (patch) | |
| tree | d9db106ba61aa147948ab01a95b47c29fa7fa065 /src/services/theme_data/theme_data_3.service.js | |
| parent | 709ce1611a557fdeb3c5f34ed3ba8cd62ead89f2 (diff) | |
avatar shadows
Diffstat (limited to 'src/services/theme_data/theme_data_3.service.js')
| -rw-r--r-- | src/services/theme_data/theme_data_3.service.js | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/services/theme_data/theme_data_3.service.js b/src/services/theme_data/theme_data_3.service.js index 9cab6dd4..3210c678 100644 --- a/src/services/theme_data/theme_data_3.service.js +++ b/src/services/theme_data/theme_data_3.service.js @@ -26,20 +26,10 @@ import Border from 'src/components/border.style.js' import Post from 'src/components/post.style.js' import Notification from 'src/components/notification.style.js' import RichContent from 'src/components/rich_content.style.js' +import Avatar from 'src/components/avatar.style.js' const DEBUG = false -export const DEFAULT_SHADOWS = { - avatar: [{ - x: 0, - y: 1, - blur: 8, - spread: 0, - color: '#000000', - alpha: 0.7 - }] -} - const components = { Root, Text, @@ -59,7 +49,8 @@ const components = { Input, Post, Notification, - RichContent + RichContent, + Avatar } // "Unrolls" a tree structure of item: { parent: { ...item2, parent: { ...item3, parent: {...} } }} @@ -372,7 +363,7 @@ export const init = (extraRuleset, palette) => { // Normalizing states and variants to always include "normal" const states = { normal: '', ...originalStates } const variants = { normal: '', ...originalVariants } - const innerComponents = validInnerComponents.map(name => components[name]) + const innerComponents = (validInnerComponents).map(name => components[name]) // Optimization: we only really need combinations without "normal" because all states implicitly have it const permutationStateKeys = Object.keys(states).filter(s => s !== 'normal') @@ -448,7 +439,6 @@ export const init = (extraRuleset, palette) => { dynamicVars.inheritedBackground = lowerLevelBackground - // TODO properly provide "parent" text color? const intendedTextColor = convert(findColor(inheritedTextColor, dynamicVars)).rgb const textColor = newTextRule.directives.textAuto === 'no-auto' ? intendedTextColor @@ -495,6 +485,7 @@ export const init = (extraRuleset, palette) => { } else { computed[selector] = computed[selector] || {} + // TODO make background non-mandatory if (computedDirectives.background) { let inheritRule = null const variantRules = ruleset.filter(findRules({ component: component.name, variant: combination.variant, parent })) |
