MDL-78619 theme: Communication button fixes
The footer button was missing some CSS to factor in the blocks drawer. Also added noreferrer to the window.open call made when clicking the communication button, to avoid the risks associated with opening in _blank without removing access to the referrer and opener (noopener is implicitly defined in modern browsers when noreferrer is set).
This commit is contained in:
@@ -47,7 +47,8 @@ $drawer-bg: darken($body-bg, 5%) !default;
|
||||
[data-region="drawer"] {
|
||||
padding: $drawer-padding-x $drawer-padding-y;
|
||||
}
|
||||
.jsenabled .btn-footer-popover {
|
||||
.jsenabled .btn-footer-popover,
|
||||
.jsenabled .btn-footer-communication {
|
||||
@include transition(0.2s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +228,8 @@
|
||||
margin-left: 0;
|
||||
margin-right: $drawer-right-width;
|
||||
padding-right: 1rem;
|
||||
.jsenabled & .btn-footer-popover {
|
||||
.jsenabled & .btn-footer-popover,
|
||||
.jsenabled & .btn-footer-communication {
|
||||
right: calc(#{$drawer-right-width} + 2rem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29610,12 +29610,14 @@ span.editinstructions .alert-link {
|
||||
[data-region=drawer] {
|
||||
padding: 20px 20px;
|
||||
}
|
||||
.jsenabled .btn-footer-popover {
|
||||
.jsenabled .btn-footer-popover,
|
||||
.jsenabled .btn-footer-communication {
|
||||
transition: 0.2s;
|
||||
}
|
||||
}
|
||||
@media (min-width: 576px) and (prefers-reduced-motion: reduce) {
|
||||
.jsenabled .btn-footer-popover {
|
||||
.jsenabled .btn-footer-popover,
|
||||
.jsenabled .btn-footer-communication {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
@@ -36666,7 +36668,7 @@ span[data-flexitour=container][x-placement=right] div[data-role=arrow]:after, sp
|
||||
margin-right: 315px;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
.jsenabled #page.drawers.show-drawer-right .btn-footer-popover {
|
||||
.jsenabled #page.drawers.show-drawer-right .btn-footer-popover, .jsenabled #page.drawers.show-drawer-right .btn-footer-communication {
|
||||
right: calc(315px + 2rem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<footer id="page-footer" class="footer-popover bg-white">
|
||||
<div data-region="footer-container-popover">
|
||||
{{#output.has_communication_links}}
|
||||
<button onclick="window.open('{{output.communication_url}}', '_blank')" class="btn btn-icon bg-primary text-white icon-no-margin btn-footer-communication" aria-label="{{#str}}communicationroomlink, course{{/str}}">
|
||||
<button onclick="window.open('{{output.communication_url}}', '_blank', 'noreferrer')" class="btn btn-icon bg-primary text-white icon-no-margin btn-footer-communication" aria-label="{{#str}}communicationroomlink, course{{/str}}">
|
||||
{{#pix}}t/messages-o, core{{/pix}}
|
||||
</button>
|
||||
{{/output.has_communication_links}}
|
||||
|
||||
@@ -29610,12 +29610,14 @@ span.editinstructions .alert-link {
|
||||
[data-region=drawer] {
|
||||
padding: 20px 20px;
|
||||
}
|
||||
.jsenabled .btn-footer-popover {
|
||||
.jsenabled .btn-footer-popover,
|
||||
.jsenabled .btn-footer-communication {
|
||||
transition: 0.2s;
|
||||
}
|
||||
}
|
||||
@media (min-width: 576px) and (prefers-reduced-motion: reduce) {
|
||||
.jsenabled .btn-footer-popover {
|
||||
.jsenabled .btn-footer-popover,
|
||||
.jsenabled .btn-footer-communication {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
@@ -36600,7 +36602,7 @@ span[data-flexitour=container][x-placement=right] div[data-role=arrow]:after, sp
|
||||
margin-right: 315px;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
.jsenabled #page.drawers.show-drawer-right .btn-footer-popover {
|
||||
.jsenabled #page.drawers.show-drawer-right .btn-footer-popover, .jsenabled #page.drawers.show-drawer-right .btn-footer-communication {
|
||||
right: calc(315px + 2rem);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user