mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 17:24:23 -04:00
Add grey lines to visually show level of nesting
Uses some CSS to draw some grey lines to show which radios descend from which. I don’t feel like the intentation is enough, and it looks a bit messy because the circles of the radio buttons don’t have straight edges easily suggest visual alignment. Copies the design from conditionally revealing content in the design system: https://design-system.service.gov.uk/components/radios/#conditionally-revealing-content Implementation is done with pseudo elements, because borders can’t be positionned exactly enough.
This commit is contained in:
@@ -19,10 +19,9 @@
|
||||
options,
|
||||
child_map,
|
||||
disable=[],
|
||||
option_hints={},
|
||||
top_level=False
|
||||
option_hints={}
|
||||
) %}
|
||||
<ul{% if not top_level %} class="panel panel-border-narrow"{% endif %}>
|
||||
<ul>
|
||||
{% for option in options %}
|
||||
{% if child_map[option.data] %}
|
||||
{% call radio(option, disable, option_hints, as_list_item=True) %}
|
||||
@@ -47,7 +46,9 @@
|
||||
{% call radios_wrapper(
|
||||
field, hint, disable, option_hints, hide_legend
|
||||
) %}
|
||||
{{ radio_list(child_map[None], child_map, disable, option_hints, top_level=True) }}
|
||||
<div class="radios-nested">
|
||||
{{ radio_list(child_map[None], child_map, disable, option_hints) }}
|
||||
</div>
|
||||
{% endcall %}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user