Fixes #3665 - Longer category names break boxes in mobile version.
This commit is contained in:
parent
4a71dc4eeb
commit
6a6166f9a5
4 changed files with 59 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
<a href="<%- @item.url %>">
|
<a href="<%- @item.url %>">
|
||||||
<span class="section-inner">
|
<span class="section-inner">
|
||||||
<%- @iconWithModifier(@item, className: 'section-inner-icon-holder', iconset: @iconset, addStateClass: true) %>
|
<%- @iconWithModifier(@item, className: 'section-inner-icon-holder', iconset: @iconset, addStateClass: true) %>
|
||||||
<span><%= @item.title %></span>
|
<span class="title"><%= @item.title %></span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -36,6 +36,12 @@ $dark-border: hsl(210, 14%, 91%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin small-phone {
|
||||||
|
@media screen and (max-width: 576px) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* sets LTR and RTL within the same style call */
|
/* sets LTR and RTL within the same style call */
|
||||||
@mixin bidi-style($prop, $value, $inverse-prop, $default-value) {
|
@mixin bidi-style($prop, $value, $inverse-prop, $default-value) {
|
||||||
#{$prop}: $value;
|
#{$prop}: $value;
|
||||||
|
@ -458,6 +464,9 @@ b {
|
||||||
ul,
|
ul,
|
||||||
ol {
|
ol {
|
||||||
@include bidi-style(padding-left, 1.5em, padding-right, 0);
|
@include bidi-style(padding-left, 1.5em, padding-right, 0);
|
||||||
|
@include phone {
|
||||||
|
@include bidi-style(padding-left, 0, padding-right, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -704,12 +713,20 @@ b {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include small-phone {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
padding-bottom: 72%;
|
padding-bottom: 82%;
|
||||||
position: relative;
|
position: relative;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
|
|
||||||
@extend %box-link;
|
@extend %box-link;
|
||||||
|
|
||||||
|
@include small-phone {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--subsection {
|
&--subsection {
|
||||||
|
@ -731,10 +748,31 @@ b {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
@include small-phone {
|
||||||
|
position: static;
|
||||||
|
padding: 10px;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
text-align: initial;
|
||||||
|
|
||||||
|
> span {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 576px) {
|
||||||
|
.title {
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: auto;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-category,
|
&-category,
|
||||||
|
@ -852,6 +890,14 @@ b {
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
width: 35px;
|
||||||
|
|
||||||
|
.sections--grid & {
|
||||||
|
@include small-phone {
|
||||||
|
@include ltr(margin, 0);
|
||||||
|
@include rtl(margin, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13510,6 +13510,13 @@ span.is-disabled {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: auto;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
<%= link_to custom_path_if_needed help_category_path(category.translation, locale: params[:locale]), @knowledge_base do %>
|
<%= link_to custom_path_if_needed help_category_path(category.translation, locale: params[:locale]), @knowledge_base do %>
|
||||||
<span class="section-inner">
|
<span class="section-inner">
|
||||||
<%= icon(category.category_icon, knowledge_base.iconset) %>
|
<%= icon(category.category_icon, knowledge_base.iconset) %>
|
||||||
<span><%= category.translation.title %></span>
|
<span>
|
||||||
<%= visibility_note(category) %>
|
<span class="title"><%= category.translation.title %></span>
|
||||||
|
<%= visibility_note(category) %>
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue