Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask CFPB: Remove inset-row, video_player-row, content_sidebar #8289

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cfgov/ask_cfpb/jinja2/ask-cfpb/ask-answer-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% for block in value %}
{% set after_tip = value[loop.index - 2].block_type == 'tip' if loop.index > 1 else False %}
{% if not after_tip %}
<div class="row {{'inset-row' if block.block_type == 'tip' else block.block_type~'-row'}}"
<div class="row"
{% if block.value.anchor_tag %}
id="{{ block.value.anchor_tag }}"
{% endif %}>
Expand Down
8 changes: 4 additions & 4 deletions cfgov/ask_cfpb/tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_content_block_applies_wrapper_to_tip(self):
block = AskAnswerContent()
value = block.to_python([self.tip_data])
html = block.render(value)
expected_html = '<div class="inset-row row">{}</div>'.format(
expected_html = '<div class="row">{}</div>'.format(
self.expected_tip_html
)
self.assertHTMLEqual(html, expected_html)
Expand All @@ -36,7 +36,7 @@ def test_content_block_applies_wrapper_to_tip_and_next_block(self):
block = AskAnswerContent()
value = block.to_python([self.tip_data, self.text_data])
html = block.render(value)
expected_html = '<div class="inset-row row">{}{}</div>'.format(
expected_html = '<div class="row">{}{}</div>'.format(
self.expected_tip_html, self.expected_text_html
)
self.assertHTMLEqual(html, expected_html)
Expand All @@ -45,10 +45,10 @@ def test_content_block_does_not_apply_wrapper_without_tip(self):
block = AskAnswerContent()
value = block.to_python([self.text_data])
html = block.render(value)
expected_html = '<div class="text-row row">{}</div>'.format(
expected_html = '<div class="row">{}</div>'.format(
self.expected_text_html
)
self.assertNotIn('<div class="inset-row row">', html)
self.assertNotIn('<div class="row">', html)
self.assertHTMLEqual(html, expected_html)


Expand Down
24 changes: 3 additions & 21 deletions cfgov/unprocessed/css/on-demand/ask.less
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,6 @@
max-width: 41.875rem;
}

.respond-to-min(@bp-lg-min, {
.content_sidebar {
padding-top: 0;
}
});

.o-expandable_cue-close {
display: none;
}

.answer-text {
h2,
h3,
Expand All @@ -148,7 +138,6 @@
margin-top: unit(@grid_gutter-width / 2 / @base-font-size-px, em);
}

.video_player-row + .row,
.row + .row > .o-table:first-child,
.row + .row > .o-video-player:first-child {
margin-top: unit(@grid_gutter-width / @base-font-size-px, em);
Expand All @@ -162,27 +151,20 @@
margin-top: unit(@grid_gutter-width / @size-iii, em);
}

.row + .row:not(.inset-row) h4 {
.row + .row h4 {
margin-top: unit(@grid_gutter-width / @size-iv, em);
}

// Large desktop size.
.respond-to-min(@bp-lg-min, {
.row + .row h2 {
margin-top: unit( @grid_gutter-width * 1.5 / @size-ii, em );
}
});
}

// Mobile only.
.respond-to-max(@bp-xs-max, {
.inset-row {
display: flex;
flex-direction: column-reverse;

.m-inset {
margin-top: unit( @grid_gutter-width / @base-font-size-px, em );
}
}

.related-questions {
margin: unit( @grid_gutter-width / @base-font-size-px, em ) 0;
}
Expand Down
Loading