Closed macburgee1 closed 4 years ago
DCF layouts are provided by the dcf_layouts module. DCF classes are provided by the dcf_classes module. The margin between blocks is something that'll be added dcf_layouts.
The inverse behavior is trickier. There are two ways to tackle that:
I'm leaning toward option 2
I think we want something like #2 but I was thinking about it in slightly different terms:
Instead of configuring a set of classes that trigger the inverse behavior, my thought is that .dcf-inverse triggers the behavior. Assigning it as one of the section classes (or within a package) puts it on the wrapper (which doesn't do anything other than change the
text color) but also triggers the application of it to the child elements.
I don't think we need to define that .dcf-bg-scarlet and .dcf-bg-gray etc trigger the behavior because in those cases you would be picking .dcf-inverse from the list too.
When I add dcf-inverse
to the section (alongside unl-bg-scarlet
), paragraph text changes to white, but <h2>
elements are unchanged. And if I recall correctly, that may be by design. Or are you suggesting we check for the dcf-inverse
class at the section level when rendering the section's <h2>
, and add the class to the <h2>
if it's present at the section level?
Yes the later. Check for dcf-inverse at the section level and then apply it to h2 within that section.
Currently, the DCF margin classes, which can be used to designate the amount of vertical margin between blocks in the same region, are hard-coded. Would there be a benefit in moving them to config?
They could be but maybe this is something that falls under, "not everything needs to be configurable, we can have some fixed defaults." I would lean toward the later.
I've made the suggested change. Section and title attributes are now initialized at the beginning of the build method. Before the change, the behavior is as described (i.e. inverse class is not applied to title). After the change, the behavior is corrected (i.e. inverse class is applied to title).
Section title should be displayed in inverse on dark backgrounds Add default margin between blocks in each column Add section setting to override default margin in each column