mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
dropdown-widget: Fix alignment of disabled option.
The alignment of icon and text of the disabled option in dropdown widget was somewhow broken due to an extra span element present which broke the grid layout used for rendering the icon and text properly. This also makes the layout consistent with other options shown with icon. This was due toe643d7e6fdwhich resulted in space between icon and text. We could have fix that by using "~" character to remove whitespace in handlebar templates but making the layout consistent felt a better choice. (cherry picked from commit46f338f54f)
This commit is contained in:
committed by
Alex Vandiver
parent
e12a9fccc6
commit
d9ea917b46
@@ -1145,9 +1145,15 @@ input.settings_text_input {
|
||||
.setting-disabled-option {
|
||||
color: hsl(38deg 46% 54%);
|
||||
|
||||
.setting-disabled-option-text,
|
||||
.setting-disabled-option-icon {
|
||||
color: hsl(38deg 46% 54%);
|
||||
}
|
||||
|
||||
.setting-disabled-option-icon {
|
||||
align-self: center;
|
||||
/* Values set to match text alignment in stream dropdown. */
|
||||
padding: 0 5px 0 1px;
|
||||
padding: 0 5px 0 2px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,22 +24,20 @@
|
||||
</span>
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="dropdown-list-item-common-styles">
|
||||
<a class="dropdown-list-item-common-styles {{#if is_setting_disabled}}setting-disabled-option{{/if}}">
|
||||
{{#if stream}}
|
||||
{{> inline_decorated_channel_name stream=stream show_colored_icon=true}}
|
||||
{{else if is_direct_message}}
|
||||
<i class="zulip-icon zulip-icon-users channel-privacy-type-icon"></i> <span class="decorated-dm-name">{{name}}</span>
|
||||
{{else if is_setting_disabled}}
|
||||
<span class="setting-disabled-option">
|
||||
{{#if show_disabled_icon}}
|
||||
<i class="setting-disabled-option-icon fa fa-ban" aria-hidden="true"></i>
|
||||
{{/if}}
|
||||
{{#if show_disabled_option_name}}
|
||||
<span class="dropdown-list-text-neutral">{{name}}</span>
|
||||
{{else}}
|
||||
<span class="dropdown-list-text-neutral">{{t "Disable" }}</span>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{#if show_disabled_icon}}
|
||||
<i class="setting-disabled-option-icon fa fa-ban" aria-hidden="true"></i>
|
||||
{{/if}}
|
||||
{{#if show_disabled_option_name}}
|
||||
<span class="setting-disabled-option-text dropdown-list-text-neutral">{{name}}</span>
|
||||
{{else}}
|
||||
<span class="setting-disabled-option-text dropdown-list-text-neutral">{{t "Disable" }}</span>
|
||||
{{/if}}
|
||||
{{else if (eq unique_id -2)}}
|
||||
{{!-- This is the option for PresetUrlOption.MAPPING --}}
|
||||
<i class="zulip-icon zulip-icon-equal channel-privacy-type-icon" aria-hidden="true"></i> <span class="dropdown-list-text-selected">{{name}}</span>
|
||||
|
||||
Reference in New Issue
Block a user