Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions assets/js/protocol/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ MzpMenu.open = (el, animate) => {

_menuOpen = true; // For checking menu state on keyup.

el.querySelector('.mzp-c-menu-title').setAttribute('aria-expanded', true);
el.querySelector('.mzp-c-menu-heading').setAttribute('aria-expanded', true);

if (typeof _options.onMenuOpen === 'function') {
_options.onMenuOpen(el);
Expand All @@ -50,7 +50,7 @@ MzpMenu.close = () => {
current[i].classList.remove('mzp-is-selected');
current[i].classList.remove('mzp-is-animated');

current[i].querySelector('.mzp-c-menu-title').setAttribute('aria-expanded', false);
current[i].querySelector('.mzp-c-menu-heading').setAttribute('aria-expanded', false);
}

_menuOpen = false; // For checking menu state on keyup.
Expand Down Expand Up @@ -97,7 +97,7 @@ MzpMenu.toggle = (el) => {
// https://github.com/mozilla/bedrock/issues/6221 :/
el.classList.remove('mzp-is-selected');
el.classList.remove('mzp-is-animated');
el.querySelector('.mzp-c-menu-title').setAttribute('aria-expanded', false);
el.querySelector('.mzp-c-menu-heading').setAttribute('aria-expanded', false);

if (typeof _options.onMenuClose === 'function') {
_options.onMenuClose();
Expand Down Expand Up @@ -230,7 +230,7 @@ MzpMenu.bindEventsWide = () => {
items[i].addEventListener('mouseenter', MzpMenu.onMouseEnter, false);
items[i].addEventListener('mouseleave', MzpMenu.onMouseLeave, false);
items[i].addEventListener('focusout', MzpMenu.onFocusOut, false);
link = items[i].querySelector('.mzp-c-menu-title');
link = items[i].querySelector('.mzp-c-menu-heading');
link.addEventListener('click', MzpMenu.onClickWide, false);

close = items[i].querySelector('.mzp-c-menu-button-close');
Expand All @@ -254,7 +254,7 @@ MzpMenu.unbindEventsWide = () => {
items[i].removeEventListener('mouseleave', MzpMenu.onMouseLeave, false);
items[i].removeEventListener('focusout', MzpMenu.onFocusOut, false);

link = items[i].querySelector('.mzp-c-menu-title');
link = items[i].querySelector('.mzp-c-menu-heading');
link.removeEventListener('click', MzpMenu.onClickWide, false);

close = items[i].querySelector('.mzp-c-menu-button-close');
Expand All @@ -268,7 +268,7 @@ MzpMenu.unbindEventsWide = () => {
* Bind events for small viewports.
*/
MzpMenu.bindEventsSmall = () => {
const items = document.querySelectorAll('.mzp-c-menu-category.mzp-js-expandable .mzp-c-menu-title');
const items = document.querySelectorAll('.mzp-c-menu-category.mzp-js-expandable .mzp-c-menu-heading');

for (let i = 0; i < items.length; i++) {
items[i].addEventListener('click', MzpMenu.onClickSmall, false);
Expand All @@ -279,7 +279,7 @@ MzpMenu.bindEventsSmall = () => {
* Unbind events for small viewports.
*/
MzpMenu.unbindEventsSmall = () => {
const items = document.querySelectorAll('.mzp-c-menu-category.mzp-js-expandable .mzp-c-menu-title');
const items = document.querySelectorAll('.mzp-c-menu-category.mzp-js-expandable .mzp-c-menu-heading');

for (let i = 0; i < items.length; i++) {
items[i].removeEventListener('click', MzpMenu.onClickSmall, false);
Expand All @@ -290,7 +290,7 @@ MzpMenu.unbindEventsSmall = () => {
* Set initial ARIA menu panel states.
*/
MzpMenu.setAria = () => {
const items = document.querySelectorAll('.mzp-c-menu-category.mzp-js-expandable .mzp-c-menu-title');
const items = document.querySelectorAll('.mzp-c-menu-category.mzp-js-expandable .mzp-c-menu-heading');

for (let i = 0; i < items.length; i++) {
items[i].setAttribute('aria-expanded', false);
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/protocol/base/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
@use 'elements/details';
@use 'elements/document';
@use 'elements/forms';
@use 'elements/headings';
@use 'elements/links';
@use 'elements/lists';
@use 'elements/quotes';
@use 'elements/tables';
@use 'elements/titles';
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@use '../../includes/lib' as *;

// Utility classes for title styles.
// Utility classes for heading styles.
// These classes are purely presentational. Don't use them if you don't have to.

.mzp-u-heading-2xl {
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/protocol/components/_article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
}

.mzp-c-article-title {
.mzp-c-article-heading {
@include text-heading-lg;
}

Expand Down
2 changes: 1 addition & 1 deletion assets/sass/protocol/components/_billboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $billboard-content-width-lg: 374px + $spacing-md; // content width + spacing med
width: 100%;
}

.mzp-c-billboard-title {
.mzp-c-billboard-heading {
@include text-heading-md;
}

Expand Down
6 changes: 3 additions & 3 deletions assets/sass/protocol/components/_callout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
.mzp-c-callout.mzp-l-compact {
text-align: start;

.mzp-c-callout-title {
.mzp-c-callout-heading {
@include text-heading-sm;
}

Expand Down Expand Up @@ -64,12 +64,12 @@
width: auto;
}

.mzp-c-callout-title,
.mzp-c-callout-heading,
.mzp-c-callout-desc {
margin-bottom: 0;
}

.mzp-c-callout-title + .mzp-c-callout-desc {
.mzp-c-callout-heading + .mzp-c-callout-desc {
margin-top: $spacing-sm;
}
}
Expand Down
14 changes: 7 additions & 7 deletions assets/sass/protocol/components/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@
background-image: url('#{$image-path}/icons/audio-card.svg');
}

.mzp-c-card-title {
.mzp-c-card-heading {
@include text-heading-xs;
display: inline;
}

.mzp-c-card-title,
.mzp-c-card-heading,
.mzp-c-card-cta-text {
border-bottom: 2px solid transparent;
}
Expand Down Expand Up @@ -106,7 +106,7 @@
transition: box-shadow 0.1s ease-in-out;
box-shadow: 0 0 0 4px $color-marketing-gray-20;

.mzp-c-card-title,
.mzp-c-card-heading,
.mzp-c-card-cta-text {
transition: border-bottom-color 100ms ease-in-out;
border-bottom: 2px solid;
Expand Down Expand Up @@ -154,10 +154,10 @@
}

// * -------------------------------------------------------------------------- */
// Card with larger title
// Card with larger heading

.mzp-c-card.mzp-c-card-large {
.mzp-c-card-title {
.mzp-c-card-heading {
@include text-heading-md;
}

Expand All @@ -167,15 +167,15 @@
}

// * -------------------------------------------------------------------------- */
// Card with small title and text
// Card with small heading and text

.mzp-c-card.mzp-c-card-small {
.mzp-c-card-tag,
.mzp-c-card-cta {
@include text-body-xs;
}

.mzp-c-card-title {
.mzp-c-card-heading {
Comment thread
stephaniehobson marked this conversation as resolved.
@include text-heading-2xs;
}

Expand Down
8 changes: 4 additions & 4 deletions assets/sass/protocol/components/_menu-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ $icon-size: 24px;
&:hover,
&:active,
&:focus {
.mzp-c-menu-item-title {
.mzp-c-menu-item-heading {
transition: border-bottom-color 100ms ease-in-out;
border-bottom: 2px solid var(--theme-body-text-color);
color: var(--theme-body-text-color);
}
}

.mzp-c-menu-item-title {
.mzp-c-menu-item-heading {
border-bottom: 2px solid transparent;
}
}

.mzp-c-menu-item-head {
display: block;

.mzp-c-menu-item-title {
.mzp-c-menu-item-heading {
border-bottom: 2px solid transparent;
}
}
Expand All @@ -55,7 +55,7 @@ $icon-size: 24px;
}
}

.mzp-c-menu-item-title {
.mzp-c-menu-item-heading {
@include text-heading-2xs;
display: inline;
}
Expand Down
4 changes: 2 additions & 2 deletions assets/sass/protocol/components/_menu-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
display: inline-block;
}

.mzp-c-menu-list-title {
.mzp-c-menu-list-heading {
font-family: var(--theme-button-font-family);
font-size: inherit;
font-weight: bold;
Expand Down Expand Up @@ -67,7 +67,7 @@
position: relative;
}

.mzp-c-menu-list-title {
.mzp-c-menu-list-heading {
button {
background: transparent;
border: 0;
Expand Down
28 changes: 14 additions & 14 deletions assets/sass/protocol/components/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}

.mzp-c-menu-category {
.mzp-c-menu-title {
.mzp-c-menu-heading {
border-bottom: 1px solid $color-marketing-gray-30;
color: var(--theme-body-text-color);
display: block;
Expand All @@ -70,7 +70,7 @@
}
}

&.mzp-has-drop-down .mzp-c-menu-title {
&.mzp-has-drop-down .mzp-c-menu-heading {
text-decoration: none;

&::before {
Expand All @@ -88,7 +88,7 @@
}

@supports (display: flex) {
.mzp-c-menu-title {
.mzp-c-menu-heading {
align-items: center;
display: flex;
}
Expand All @@ -98,7 +98,7 @@
display: inline-block;
float: inline-start;

.mzp-c-menu-title {
.mzp-c-menu-heading {
border-bottom: none;
padding: 0 $spacing-sm $spacing-lg;

Expand All @@ -107,38 +107,38 @@
}
}

&.mzp-has-drop-down .mzp-c-menu-title::before {
&.mzp-has-drop-down .mzp-c-menu-heading::before {
display: none;
}
}

@media #{$mq-lg} {
.mzp-c-menu-title {
.mzp-c-menu-heading {
padding: 0 $spacing-md $spacing-lg;
}
}

@media #{$mq-xl} {
.mzp-c-menu-title {
.mzp-c-menu-heading {
padding: 0 $spacing-lg $spacing-lg;
}
}
}

// Basic hover interactions with JavaScript disabled or not supported..
.mzp-c-menu.mzp-is-basic .mzp-c-menu-category {
.mzp-c-menu-title::before {
.mzp-c-menu-heading::before {
display: none;
}

@media #{$mq-md} {
.mzp-c-menu-title::before {
.mzp-c-menu-heading::before {
display: none;
}

&.mzp-has-drop-down:hover,
&.mzp-has-drop-down:focus {
.mzp-c-menu-title {
.mzp-c-menu-heading {
@include highlighted;
z-index: 1001;
}
Expand All @@ -150,7 +150,7 @@
}

&.mzp-has-drop-down:focus-within {
.mzp-c-menu-title {
.mzp-c-menu-heading {
@include highlighted;
z-index: 1001;
}
Expand All @@ -166,7 +166,7 @@
// Enhanced hover interactions with JavaScript enabled.
.mzp-c-menu.mzp-is-enhanced .mzp-c-menu-category {
&.mzp-is-selected {
.mzp-c-menu-title::before {
.mzp-c-menu-heading::before {
transform: rotate(45deg);
}

Expand All @@ -179,13 +179,13 @@
@media #{$mq-md} {
&.mzp-is-animated {
.mzp-c-menu-panel,
.mzp-c-menu-title::after {
.mzp-c-menu-heading::after {
animation: mzp-a-fade-in 80ms ease-in 0ms 1 normal both; /* stylelint-disable-line no-unknown-animations */
}
}

&.mzp-is-selected {
.mzp-c-menu-title {
.mzp-c-menu-heading {
@include highlighted;
z-index: 101;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/protocol/components/_newsletter-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
}
}

.mzp-c-newsletter-title {
.mzp-c-newsletter-heading {
@include text-heading-md;
margin-bottom: 0.25em;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/protocol/components/_sidebar-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
}
}

.mzp-c-sidemenu-title {
.mzp-c-sidemenu-heading {
line-height: 1.5;
margin-bottom: 0.25em;
@include text-body-lg;
Expand Down
Loading
Loading