MDL-78954 output: remove default chevron from kebab menus

Action menus have a method set_kebab_trigger that converts the action
menu button into a proper kebab icon. However, this method does not
remove the standard bootstrap dropdown chevron and the visual
information is replicated (kebab icon + chevron). For now this method is
only used a couple of times but in every case (grade, course...) they
add unnecessary adhoc css rules to hide the chevron when it should be
the standard behaviour. This commit remove the chevron when the action
menu is displayed as a kebab menu.
This commit is contained in:
Ferran Recio 2023-08-21 11:50:37 +02:00
parent 729937c89a
commit 7fea815e0f
5 changed files with 23 additions and 10 deletions

View File

@ -4431,7 +4431,7 @@ class action_menu implements renderable, templatable {
/**
* Classes for the trigger menu
*/
const DEFAULT_KEBAB_TRIGGER_CLASSES = 'btn btn-icon d-flex align-items-center justify-content-center';
const DEFAULT_KEBAB_TRIGGER_CLASSES = 'btn btn-icon d-flex align-items-center justify-content-center no-caret';
/**
* Setup trigger as in the kebab menu.

View File

@ -379,6 +379,16 @@ img.resize {
white-space: nowrap;
display: inline;
// Kebab action menus do no show chevrons or extra dropdown icons.
.dropdown-toggle.no-caret {
&::after {
display: none;
}
&::before {
display: none;
}
}
.dropdown.downleft .dropdown-subpanel-content {
right: 0;
left: auto;

View File

@ -1534,9 +1534,6 @@ $activity-add-hover: theme-color-level('primary', -10) !default;
.actions {
position: relative;
}
.dropdown-toggle::after {
display: none;
}
// Override '.btn.btn-icon' styles from buttons.scss to make action menu buttons smaller.
.action-menu .btn.btn-icon {
height: ($icon-width + 15px);

View File

@ -23252,6 +23252,12 @@ img.resize {
white-space: nowrap;
display: inline;
}
.action-menu .dropdown-toggle.no-caret::after {
display: none;
}
.action-menu .dropdown-toggle.no-caret::before {
display: none;
}
.action-menu .dropdown.downleft .dropdown-subpanel-content {
right: 0;
left: auto;
@ -29247,9 +29253,6 @@ span.editinstructions .alert-link {
.activity-item .activity-actions .actions {
position: relative;
}
.activity-item .activity-actions .dropdown-toggle::after {
display: none;
}
.activity-item .activity-actions .action-menu .btn.btn-icon {
height: 31px;
width: 31px;

View File

@ -23252,6 +23252,12 @@ img.resize {
white-space: nowrap;
display: inline;
}
.action-menu .dropdown-toggle.no-caret::after {
display: none;
}
.action-menu .dropdown-toggle.no-caret::before {
display: none;
}
.action-menu .dropdown.downleft .dropdown-subpanel-content {
right: 0;
left: auto;
@ -29247,9 +29253,6 @@ span.editinstructions .alert-link {
.activity-item .activity-actions .actions {
position: relative;
}
.activity-item .activity-actions .dropdown-toggle::after {
display: none;
}
.activity-item .activity-actions .action-menu .btn.btn-icon {
height: 31px;
width: 31px;