Adjusted styles to *not* break tests

This commit is contained in:
Jonathan Bobel
2023-08-15 16:45:48 -04:00
parent d66ff27bae
commit bad2fd5fe4
3 changed files with 44 additions and 16 deletions

View File

@@ -136,6 +136,16 @@ td.table-empty-message {
background-position: 0; background-position: 0;
} }
.usa-checkbox .usa-checkbox__label {
+ a.template-list-folder, + a.usa-template-list-template {
margin-left: units(4);
}
}
.usa-checkbox__label-description {
margin: units(2px) 0 units(1) units(4);
}
.folder-heading-folder { .folder-heading-folder {
background: url(../img/material-icons/folder_open.svg) no-repeat; background: url(../img/material-icons/folder_open.svg) no-repeat;
padding-left: units(4); padding-left: units(4);
@@ -273,12 +283,20 @@ td.table-empty-message {
.file-list-hint { .file-list-hint {
margin: 0; margin: 0;
} }
.table-field, .table-field-right-aligned {
width: 50%;
}
&.usage-table {
.table-field, .table-field-left-aligned, .table-field-right-aligned {
width: auto;
}
}
} }
#template-list { #template-list {
max-height: 500px; max-height: 500px;
overflow-y: auto; overflow-y: auto;
padding-left: units(1); padding: units(1) 0 units(1) units(1);
margin: units(2) 0 units(5); margin: units(2) 0 units(5);
ul { ul {
padding: 0; padding: 0;
@@ -296,7 +314,7 @@ td.table-empty-message {
padding: 0; padding: 0;
.pill-item__container { .pill-item__container {
border: 1px solid color("gray-cool-10"); border: 1px solid color("gray-cool-10");
width: 25%; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;
@@ -307,6 +325,9 @@ td.table-empty-message {
font-size: units(5); font-size: units(5);
line-height: units(6); line-height: units(6);
} }
.big-number-smallest {
font-size: units(3);
}
&:not(.pill-item--selected):hover { &:not(.pill-item--selected):hover {
background: color("blue-warm-70v"); background: color("blue-warm-70v");
} }

View File

@@ -104,17 +104,17 @@
{% macro format_item_name(name, separators=True) -%} {% macro format_item_name(name, separators=True) -%}
{%- if name is string -%} {%- if name is string -%}
{{- name -}} {{- name -}}
{%- else -%} {%- else -%}
{%- for part in name -%} {%- for part in name -%}
{{- format_item_name(part, separators) -}} {{- format_item_name(part, separators) -}}
{%- if not loop.last -%} {%- if not loop.last -%}
{%- if separators %} {%- if separators %}
<span class="message-name-separator"></span>{%- else %} {% endif -%} <span class="message-name-separator"></span>{%- else %} {% endif -%}
{% endif -%} {% endif -%}
{%- endfor -%} {%- endfor -%}
{% endif %} {% endif %}
{%- endmacro %} {%- endmacro %}
{% if template_list.template_folder_id and not template_list.templates_to_show %} {% if template_list.template_folder_id and not template_list.templates_to_show %}
@@ -134,6 +134,13 @@
<ul> <ul>
{% endif %} {% endif %}
{% set label_content %}
<span class="usa-sr-only">
{%- for ancestor in item.ancestors %}{{ format_item_name(ancestor.name, separators=False) }} {% endfor -%}
{{ format_item_name(item.name, separators=False) -}}
</span>
{% endset %}
{% for item in template_list %} {% for item in template_list %}
{% set item_link_content %} {% set item_link_content %}
@@ -150,7 +157,7 @@
</a> </a>
{% else %} {% else %}
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.id) }}" <a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.id) }}"
class="usa-link font-body-lg usa-template-list-template"> class="usa-link usa-template-list-template">
<span class="live-search-relevant"> <span class="live-search-relevant">
{%- if current_service.api_keys -%} {%- if current_service.api_keys -%}
<span class="govuk-!-display-none">{{ item.id }} </span> <span class="govuk-!-display-none">{{ item.id }} </span>
@@ -169,7 +176,7 @@
{% endset %} {% endset %}
{% set item_meta %} {% set item_meta %}
<span id="{{ item.id }}-item-hint" class="usa-hint template-list-item-hint"> <span id="{{ item.id }}-item-hint" class="usa-hint usa-checkbox__label-description template-list-item-hint">
{{ item.hint }} {{ item.hint }}
</span> </span>
{% endset %} {% endset %}

View File

@@ -14,7 +14,7 @@
Usage Usage
</h1> </h1>
<div class="bottom-gutter"> <div class="tabs tabs__usage">
{{ pill(years, selected_year, big_number_args={'smallest': True}) }} {{ pill(years, selected_year, big_number_args={'smallest': True}) }}
</div> </div>
<div id='pill-selected-item'> <div id='pill-selected-item'>