Skip to content

Commit

Permalink
Adjust styles
Browse files Browse the repository at this point in the history
Since we're now allowing <h2> and <h3> tags in the description, we
remove the broken <h3> tag from quiz-question class. Since its content
is also in the <title> element, and in order to be consistent with other
show actions in the public area, we change this tag to <h1>.

We add <h2> tag in the "Share" heading and we replace the broken <h4>
tag above adding new styles.
  • Loading branch information
taitus committed Feb 22, 2023
1 parent 8000277 commit 3aac392
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions app/assets/stylesheets/legislation_process.scss
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,15 @@
margin-bottom: 0;
text-transform: uppercase;
}
}

h4 a {
@include brand-color;
a {
@include brand-color;
font-size: rem-calc(18);
font-weight: 700;

&:hover {
text-decoration: none;
&:hover {
text-decoration: none;
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions app/views/legislation/questions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="small-12 medium-9 column">
<div class="quiz-title">
<p class="quiz-header-title"><%= t("legislation.questions.show.title") %></p>
<h4><%= link_to @process.title, @process %></h4>
<%= link_to @process.title, @process %>
</div>
</div>
<div class="small-12 medium-3 column">
Expand All @@ -28,7 +28,7 @@
</div>
<div class="row">
<div class="small-12 medium-9 column">
<h3 class="quiz-question"><%= @question.title %></h3>
<h1 class="quiz-question"><%= @question.title %></h1>
<%= AdminWYSIWYGSanitizer.new.sanitize(@question.description) %>
<div class="debate-questions" id="legislation-answer-form">
<%= render "answer_form", process: @process, question: @question, answer: @answer %>
Expand All @@ -37,7 +37,7 @@

<aside class="small-12 medium-3 column">
<div id="social-share" class="sidebar-divider"></div>
<h3><%= t("legislation.questions.show.share") %></h3>
<h2><%= t("legislation.questions.show.share") %></h2>
<%= render "/shared/social_share", title: @question.title, url: legislation_process_question_url(@question.process, @question) %>
</aside>
</div>
Expand Down

0 comments on commit 3aac392

Please sign in to comment.