Skip to content
Snippets Groups Projects
Commit 68111911 authored by HJ's avatar HJ :fire:
Browse files

i'm stupid

parent f0bbb75d
No related branches found
No related tags found
2 merge requests!1928Release 2.7.0,!1892Themes 3.0 / Pleroma ISS (Interface Style Sheets) [Side A]
export default {
name: 'Attachment',
selector: '.Attachment',
validInnerComponents: [
'Border',
'ButtonUnstyled'
],
defaultRules: [
{
directives: {
roundness: 3
}
},
{
component: 'ButtonUnstyled',
parent: { component: 'Attachment' },
directives: {
background: '#FFFFFF',
opacity: 0.9
}
}
]
}
......@@ -10,6 +10,14 @@ export default {
directives: {
roundness: 3
}
},
{
component: 'ButtonUnstyled',
parent: { component: 'Attachment' },
directives: {
background: '#FFFFFF',
opacity: 0.5
}
}
]
}
......@@ -169,6 +169,7 @@ export const init = (extraRuleset, palette) => {
return rule
})
console.log(rulesetUnsorted)
const ruleset = rulesetUnsorted
.map((data, index) => ({ data, index }))
......@@ -187,6 +188,8 @@ export const init = (extraRuleset, palette) => {
})
.map(({ data }) => data)
console.log(ruleset.filter(c => c.component === 'ButtonUnstyled'))
const virtualComponents = new Set(Object.values(components).filter(c => c.virtual).map(c => c.name))
const findColor = (color, dynamicVars) => {
......@@ -196,8 +199,6 @@ export const init = (extraRuleset, palette) => {
const [variable, modifier] = color.split(/,/g).map(str => str.trim())
const variableSlot = variable.substring(2)
if (variableSlot === 'stack') {
console.log(dynamicVars)
console.log(stacked)
const { r, g, b } = dynamicVars.stacked
targetColor = { r, g, b }
} else if (variableSlot.startsWith('parent')) {
......@@ -660,7 +661,6 @@ export const init = (extraRuleset, palette) => {
}
default:
if (k.startsWith('--')) {
console.log('LOL', k, rgba2css(findColor(v, computed[selector].dynamicVars)))
return k + ': ' + rgba2css(findColor(v, computed[selector].dynamicVars))
}
return ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment