MDL-78954 theme_boost: move action menu css to separate file

This commit is contained in:
Ferran Recio 2023-08-21 12:01:59 +02:00
parent 7fea815e0f
commit e715b7a791
5 changed files with 318 additions and 311 deletions

View File

@ -8,6 +8,7 @@ $breadcrumb-divider-rtl: "◀" !default;
// Massive, needs broken up.
@import "moodle/variables";
@import "moodle/core";
@import "moodle/action-menu";
@import "moodle/icons";
@import "moodle/admin";
@import "moodle/blocks";

View File

@ -0,0 +1,119 @@
.action-menu .dropdown-toggle {
text-decoration: none;
display: inline-block;
}
.action-menu {
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;
}
.dropdown-subpanel.content-displayed {
background-color: $gray-200;
}
.dropdown-subpanel-content {
max-width: $modal-sm;
box-shadow: 0 0 1rem rgba($black, .15);
a:focus {
outline: solid $primary;
}
}
.dropdown-subpanel-content.show {
@include optional-animation(0.15s animate-pop);
}
// Chevrons in sub panel items are always to end.
.dropdown-subpanel .dropdown-item {
&::after {
border: 0;
@extend .fa-solid;
content: fa-content($fa-var-chevron-right);
}
&::before {
display: none;
}
}
}
@keyframes animate-pop {
0% {
transform: scale(0.90, 0.90);
}
100% {
transform: scale(1, 1);
}
}
.dir-rtl .action-menu {
// Chevrons in subpanels items are always to end.
.dropdown-subpanel .dropdown-item {
&::after {
border: 0;
@extend .fa-solid;
content: fa-content($fa-var-chevron-left);
}
&::before {
display: none;
}
}
}
// Make links in a menu clickable anywhere in the row.
.dropdown-item {
a {
display: block;
width: 100%;
color: $body-color;
}
&.active,
&:active,
&:hover,
&:focus,
&:focus-within {
outline: 0;
background-color: $dropdown-link-active-bg;
color: $dropdown-link-active-color;
a {
color: $dropdown-link-active-color;
}
}
&[aria-current="true"],
&[aria-selected="true"] {
position: relative;
display: flex;
align-items: center;
&:before {
@extend .fa-solid;
content: fa-content($fa-var-check);
position: absolute;
left: 0.4rem;
font-size: 0.7rem;
}
}
}

View File

@ -370,85 +370,6 @@ img.resize {
width: 1em;
}
.action-menu .dropdown-toggle {
text-decoration: none;
display: inline-block;
}
.action-menu {
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;
}
.dropdown-subpanel.content-displayed {
background-color: $gray-200;
}
.dropdown-subpanel-content {
max-width: $modal-sm;
box-shadow: 0 0 1rem rgba($black, .15);
a:focus {
outline: solid $primary;
}
}
.dropdown-subpanel-content.show {
@include optional-animation(0.15s animate-pop);
}
// Chevrons in sub panel items are always to end.
.dropdown-subpanel .dropdown-item {
&::after {
border: 0;
@extend .fa-solid;
content: fa-content($fa-var-chevron-right);
}
&::before {
display: none;
}
}
}
@keyframes animate-pop {
0% {
transform: scale(0.90, 0.90);
}
100% {
transform: scale(1, 1);
}
}
.dir-rtl .action-menu {
// Chevrons in subpanels items are always to end.
.dropdown-subpanel .dropdown-item {
&::after {
border: 0;
@extend .fa-solid;
content: fa-content($fa-var-chevron-left);
}
&::before {
display: none;
}
}
}
.block img.resize {
height: 0.9em;
width: 0.8em;
@ -2466,40 +2387,6 @@ $footer-link-color: $bg-inverse-link-color !default;
}
}
// Make links in a menu clickable anywhere in the row.
.dropdown-item {
a {
display: block;
width: 100%;
color: $body-color;
}
&.active,
&:active,
&:hover,
&:focus,
&:focus-within {
outline: 0;
background-color: $dropdown-link-active-bg;
color: $dropdown-link-active-color;
a {
color: $dropdown-link-active-color;
}
}
&[aria-current="true"],
&[aria-selected="true"] {
position: relative;
display: flex;
align-items: center;
&:before {
@extend .fa-solid;
content: fa-content($fa-var-check);
position: absolute;
left: 0.4rem;
font-size: 0.7rem;
}
}
}
.competency-tree {
ul {
padding-left: 1.5rem;

View File

@ -2083,14 +2083,14 @@
.block_navigation .block_tree [aria-expanded=false] > p:before,
.block_settings .block_tree [aria-expanded=true] > p:before,
.block_navigation .block_tree [aria-expanded=true] > p:before,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.dropdown-item[aria-current=true]:before,
.dropdown-item[aria-selected=true]:before,
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after,
.action-menu .dropdown-subpanel .dropdown-item::after {
.action-menu .dropdown-subpanel .dropdown-item::after,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after {
font-weight: 900;
}
@ -4944,14 +4944,14 @@
.block_navigation .block_tree [aria-expanded=false] > p:before,
.block_settings .block_tree [aria-expanded=true] > p:before,
.block_navigation .block_tree [aria-expanded=true] > p:before,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.dropdown-item[aria-current=true]:before,
.dropdown-item[aria-selected=true]:before,
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after,
.action-menu .dropdown-subpanel .dropdown-item::after,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.far,
.fa-regular,
.content-bank-container.view-grid .cb-unlisted::after,
@ -4985,14 +4985,14 @@
.block_navigation .block_tree [aria-expanded=false] > p:before,
.block_settings .block_tree [aria-expanded=true] > p:before,
.block_navigation .block_tree [aria-expanded=true] > p:before,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.dropdown-item[aria-current=true]:before,
.dropdown-item[aria-selected=true]:before,
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after,
.action-menu .dropdown-subpanel .dropdown-item::after,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.far,
.fa-regular,
.content-bank-container.view-grid .cb-unlisted::after {
@ -23243,67 +23243,6 @@ img.resize {
width: 1em;
}
.action-menu .dropdown-toggle {
text-decoration: none;
display: inline-block;
}
.action-menu {
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;
}
.action-menu .dropdown-subpanel.content-displayed {
background-color: #e9ecef;
}
.action-menu .dropdown-subpanel-content {
max-width: 300px;
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15);
}
.action-menu .dropdown-subpanel-content a:focus {
outline: solid #0f6cbf;
}
.action-menu .dropdown-subpanel-content.show {
animation: 0.15s animate-pop;
}
@media (prefers-reduced-motion: reduce) {
.action-menu .dropdown-subpanel-content.show {
animation: none;
}
}
.action-menu .dropdown-subpanel .dropdown-item::after {
border: 0;
content: "\f054";
}
.action-menu .dropdown-subpanel .dropdown-item::before {
display: none;
}
@keyframes animate-pop {
0% {
transform: scale(0.9, 0.9);
}
100% {
transform: scale(1, 1);
}
}
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after {
border: 0;
content: "\f053";
}
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::before {
display: none;
}
.block img.resize {
height: 0.9em;
width: 0.8em;
@ -25269,31 +25208,6 @@ h3.sectionname .inplaceeditable.inplaceeditingon .editinstructions {
width: 112px;
}
.dropdown-item a {
display: block;
width: 100%;
color: #1d2125;
}
.dropdown-item.active, .dropdown-item:active, .dropdown-item:hover, .dropdown-item:focus, .dropdown-item:focus-within {
outline: 0;
background-color: #0f6cbf;
color: #fff;
}
.dropdown-item.active a, .dropdown-item:active a, .dropdown-item:hover a, .dropdown-item:focus a, .dropdown-item:focus-within a {
color: #fff;
}
.dropdown-item[aria-current=true], .dropdown-item[aria-selected=true] {
position: relative;
display: flex;
align-items: center;
}
.dropdown-item[aria-current=true]:before, .dropdown-item[aria-selected=true]:before {
content: "\f00c";
position: absolute;
left: 0.4rem;
font-size: 0.7rem;
}
.competency-tree ul {
padding-left: 1.5rem;
}
@ -26083,6 +25997,92 @@ blockquote {
min-width: calc(300px - 25px);
}
}
.action-menu .dropdown-toggle {
text-decoration: none;
display: inline-block;
}
.action-menu {
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;
}
.action-menu .dropdown-subpanel.content-displayed {
background-color: #e9ecef;
}
.action-menu .dropdown-subpanel-content {
max-width: 300px;
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15);
}
.action-menu .dropdown-subpanel-content a:focus {
outline: solid #0f6cbf;
}
.action-menu .dropdown-subpanel-content.show {
animation: 0.15s animate-pop;
}
@media (prefers-reduced-motion: reduce) {
.action-menu .dropdown-subpanel-content.show {
animation: none;
}
}
.action-menu .dropdown-subpanel .dropdown-item::after {
border: 0;
content: "\f054";
}
.action-menu .dropdown-subpanel .dropdown-item::before {
display: none;
}
@keyframes animate-pop {
0% {
transform: scale(0.9, 0.9);
}
100% {
transform: scale(1, 1);
}
}
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after {
border: 0;
content: "\f053";
}
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::before {
display: none;
}
.dropdown-item a {
display: block;
width: 100%;
color: #1d2125;
}
.dropdown-item.active, .dropdown-item:active, .dropdown-item:hover, .dropdown-item:focus, .dropdown-item:focus-within {
outline: 0;
background-color: #0f6cbf;
color: #fff;
}
.dropdown-item.active a, .dropdown-item:active a, .dropdown-item:hover a, .dropdown-item:focus a, .dropdown-item:focus-within a {
color: #fff;
}
.dropdown-item[aria-current=true], .dropdown-item[aria-selected=true] {
position: relative;
display: flex;
align-items: center;
}
.dropdown-item[aria-current=true]:before, .dropdown-item[aria-selected=true]:before {
content: "\f00c";
position: absolute;
left: 0.4rem;
font-size: 0.7rem;
}
.icon {
font-size: 16px;
width: 16px;

View File

@ -2083,14 +2083,14 @@
.block_navigation .block_tree [aria-expanded=false] > p:before,
.block_settings .block_tree [aria-expanded=true] > p:before,
.block_navigation .block_tree [aria-expanded=true] > p:before,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.dropdown-item[aria-current=true]:before,
.dropdown-item[aria-selected=true]:before,
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after,
.action-menu .dropdown-subpanel .dropdown-item::after {
.action-menu .dropdown-subpanel .dropdown-item::after,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after {
font-weight: 900;
}
@ -4944,14 +4944,14 @@
.block_navigation .block_tree [aria-expanded=false] > p:before,
.block_settings .block_tree [aria-expanded=true] > p:before,
.block_navigation .block_tree [aria-expanded=true] > p:before,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.dropdown-item[aria-current=true]:before,
.dropdown-item[aria-selected=true]:before,
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after,
.action-menu .dropdown-subpanel .dropdown-item::after,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.far,
.fa-regular,
.content-bank-container.view-grid .cb-unlisted::after,
@ -4985,14 +4985,14 @@
.block_navigation .block_tree [aria-expanded=false] > p:before,
.block_settings .block_tree [aria-expanded=true] > p:before,
.block_navigation .block_tree [aria-expanded=true] > p:before,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.dropdown-item[aria-current=true]:before,
.dropdown-item[aria-selected=true]:before,
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after,
.action-menu .dropdown-subpanel .dropdown-item::after,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
.dropleft .dropdown-toggle::before,
.dropdown-toggle::after,
.far,
.fa-regular,
.content-bank-container.view-grid .cb-unlisted::after {
@ -23243,67 +23243,6 @@ img.resize {
width: 1em;
}
.action-menu .dropdown-toggle {
text-decoration: none;
display: inline-block;
}
.action-menu {
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;
}
.action-menu .dropdown-subpanel.content-displayed {
background-color: #e9ecef;
}
.action-menu .dropdown-subpanel-content {
max-width: 300px;
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15);
}
.action-menu .dropdown-subpanel-content a:focus {
outline: solid #0f6cbf;
}
.action-menu .dropdown-subpanel-content.show {
animation: 0.15s animate-pop;
}
@media (prefers-reduced-motion: reduce) {
.action-menu .dropdown-subpanel-content.show {
animation: none;
}
}
.action-menu .dropdown-subpanel .dropdown-item::after {
border: 0;
content: "\f054";
}
.action-menu .dropdown-subpanel .dropdown-item::before {
display: none;
}
@keyframes animate-pop {
0% {
transform: scale(0.9, 0.9);
}
100% {
transform: scale(1, 1);
}
}
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after {
border: 0;
content: "\f053";
}
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::before {
display: none;
}
.block img.resize {
height: 0.9em;
width: 0.8em;
@ -25269,31 +25208,6 @@ h3.sectionname .inplaceeditable.inplaceeditingon .editinstructions {
width: 112px;
}
.dropdown-item a {
display: block;
width: 100%;
color: #1d2125;
}
.dropdown-item.active, .dropdown-item:active, .dropdown-item:hover, .dropdown-item:focus, .dropdown-item:focus-within {
outline: 0;
background-color: #0f6cbf;
color: #fff;
}
.dropdown-item.active a, .dropdown-item:active a, .dropdown-item:hover a, .dropdown-item:focus a, .dropdown-item:focus-within a {
color: #fff;
}
.dropdown-item[aria-current=true], .dropdown-item[aria-selected=true] {
position: relative;
display: flex;
align-items: center;
}
.dropdown-item[aria-current=true]:before, .dropdown-item[aria-selected=true]:before {
content: "\f00c";
position: absolute;
left: 0.4rem;
font-size: 0.7rem;
}
.competency-tree ul {
padding-left: 1.5rem;
}
@ -26083,6 +25997,92 @@ blockquote {
min-width: calc(300px - 25px);
}
}
.action-menu .dropdown-toggle {
text-decoration: none;
display: inline-block;
}
.action-menu {
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;
}
.action-menu .dropdown-subpanel.content-displayed {
background-color: #e9ecef;
}
.action-menu .dropdown-subpanel-content {
max-width: 300px;
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15);
}
.action-menu .dropdown-subpanel-content a:focus {
outline: solid #0f6cbf;
}
.action-menu .dropdown-subpanel-content.show {
animation: 0.15s animate-pop;
}
@media (prefers-reduced-motion: reduce) {
.action-menu .dropdown-subpanel-content.show {
animation: none;
}
}
.action-menu .dropdown-subpanel .dropdown-item::after {
border: 0;
content: "\f054";
}
.action-menu .dropdown-subpanel .dropdown-item::before {
display: none;
}
@keyframes animate-pop {
0% {
transform: scale(0.9, 0.9);
}
100% {
transform: scale(1, 1);
}
}
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::after {
border: 0;
content: "\f053";
}
.dir-rtl .action-menu .dropdown-subpanel .dropdown-item::before {
display: none;
}
.dropdown-item a {
display: block;
width: 100%;
color: #1d2125;
}
.dropdown-item.active, .dropdown-item:active, .dropdown-item:hover, .dropdown-item:focus, .dropdown-item:focus-within {
outline: 0;
background-color: #0f6cbf;
color: #fff;
}
.dropdown-item.active a, .dropdown-item:active a, .dropdown-item:hover a, .dropdown-item:focus a, .dropdown-item:focus-within a {
color: #fff;
}
.dropdown-item[aria-current=true], .dropdown-item[aria-selected=true] {
position: relative;
display: flex;
align-items: center;
}
.dropdown-item[aria-current=true]:before, .dropdown-item[aria-selected=true]:before {
content: "\f00c";
position: absolute;
left: 0.4rem;
font-size: 0.7rem;
}
.icon {
font-size: 16px;
width: 16px;