Open starryeyez024 opened 5 years ago
Design tokens!!! #solvesAllTheProblems
If we're storing our defaults in a design token for each component, we can import that into the test file and auto-generate tests.
pfe-accordion.json
{
"BorderRadius": {
"value": "$pf-global--surface--border-radius"
},
"BackgroundPosition": {
"value": "center center"
}
}
...where $pf-global--surface--border-radius: var(--pf-global--surface--BorderRadius, 3px)
In the pfe-accordion sass, the token could print: $local--BorderRadius: var(--pfe-accordion--BorderRadius, var(--pf-global--surface--BorderRadius, 3px));
pfe-band and pfe-card are the only components with AT for testing styles. We need to determine how to write tests for CSS vars.