Releases: mozilla/protocol
Releases ยท mozilla/protocol
v22.0.0
Features
- assets: (breaking) Updated @mozilla-protocol/assets to 7.0.2
- tokens: (breaking) Updated @mozilla-protocol/tokens to 7.0.0
- css: Updated button styles to match Mozilla brand refresh (#1046)
- component: Added sizing and icon support to CTA link component (#1083)
- component: Added
mzp-u-rich-textutility class to add back list and table styles (#1079) - docs: Added a new utility class section to docs.
- component: Updated breadcrumb styles (#1036)
- css: Updated line height variables for Mozilla theme to reflect guidance published in the brand portal.
- css: Removed
:hover:visitedstyles & decreased base link specificity (#1071)
Bug Fixes
- css: Breadcrumbs are wider than other site content (#933)
- js:
MzpNavigationdoesn't check forMzpSupportsavailability correctly (#1085)
Migration Tips
- Rich text utility
- If you have previously created a class to add back list and table styling to rich text fields you may be able to swap it out for the new component.
- This component currently styles h2-h4, ul, ol, dl, table, and pre. If you need more elements please create an issue.
- Breadcrumb updates do not require any changes unless you have local customizations.
- Icon updates
- Icons used internally with Protocol components have been updated but any icons used in consumer projects will have to consider the following:
- New and updated icons have intrinsic width of 16x16 instead of 24x24. If you were relying on SVG width and height attributes for sizing, you may need to update by CSS sizing.
- Updated icons are still square but do not have padding around the icon. This is particularly noticeable with menu and arrows. If you were relying on the icon for spacing, you may need to update to re-add that spacing through CSS.
- Icons formerly known as "arrow" are now known as "caret" and there are new icon designs for "arrow" name. You will need to update naming to keep the "caret" design.
- Find and replace
$url-image-arrow-down-with$url-image-caret-down-
- Mozilla brand color updates
- consumer projects will have to update any use of deprecated Mozilla brand colors to the new palettes
- Remove
:hover:visitedstyles & decrease base link specificity (#1071)- This will decrease the specificity of Protocol's link and button components, hopefully making local overrides easier, no need to change anything you already have in place.
- Removal of
:linkpseudo classes in some places will mean that<a>elements which do not have ahrefvalue could now have link styles when previously they would not have. But, like, maybe don't do that? - Removed
:visitedstyles for.mzp-c-buttonthey should match unvisited styles, if you have:visitedstyles defined check they are still legible without the expected inherited styles. - Removed the text colour change from
:focusstyles. Rely on the focus ring for a focus indicator instead.
v21.1.0
Features
- assets: Update @mozilla-protocol/assets to 6.1.1
- css: Footer changes: spacing, colour, font size. (#1063)
Bug Fixes
- css: Button link focus styling doesn't override inherited visited link styling (#842)
Migration Tips
- Un-customized implementations of the footer will not break. If you have made customizations review it at all breakpoints.
v21.0.0
Features
- assets: (breaking) Update @mozilla-protocol/assets to 6.0.1
- css: Update navigation and footer with Mozilla logo lockup.
Bug Fixes
- css: Notification bar padding of links only working for complete sentences (#1000)
- css: Missing explicit
mzp-c-notification-bar-ctadistinction (#1041) - css: Fix logo size in navigation in Firefox variant on large screen
Migration Tips
- The new Mozilla wordmark files are the same height but longer. If you are explicitly declaring a width for them, you should update it (Tip: check your CSS background images too.)
- The flat logo files are no longer square, so check their dimensions too (social files remain square)
v20.0.0
Features
- fonts: (breaking) Adds rebrand fonts, Mozilla Headline and Mozilla Text. Removes outdated Mozilla Brand font, Zilla Slab. New fonts will only support
woff2format to simplify maintenance. - fonts: Upgrade Inter font to version 4.1, drop WOFF 1.0 format (#1026)
- css: Add
text-wrap: balanceto all headings (#910) - css: Apply hover cursor from Details component to Details element (#948)
- assets: Update @mozilla-protocol/assets to 5.4.0
Migration Tips
- fonts: Any use of
font-mozillamixin should be replaced withfont-mozilla-headline. NOTE: we recommendfont-mozilla-headlineonly for text over 24px (below should befont-mozilla-text) - Headings are now balanced, which can impact other wrapping rules. Make sure any changes to
h1โh6rendering end up styled as expected, especially if you apply anywhite-space,word-breakorhyphenscustomizations. - See notes for Protocol Assets 5.4.0
v19.3.0
v19.2.0
v19.1.0
v19.0.0
Features
- component: Remove deprecated Picto Card component.
- component: Remove deprecated Hero component. (#912)
- component: Refactor and rename the Callout component (previously Call-out) (#787)
- component: Remove Compact Call-out as a separate component. It's now just a variant of the updated Callout.
- js: Update newsletter component to include JS to post directly to Basket (#839).
- css: Add CSS utility class for centered text and document existing title utility classes (#897).
Bug Fixes
- css: Fix incorrect value for
text-body-lgin Firefox theme. - js: Fix typo at
lang-switcher.jscomment - css: Center-align button text (#826)
Migration Tips
- Rename instances of
mzp-c-call-outtomzp-c-callout(note the removed dash). - Replace instances of Compact Call-out with the compact variant of Callout (
class="mzp-c-callout mzp-l-compact"). - Update references to the
call-outSCSS file tocalloutin any@importor@userules.
** e.g.@use 'components/call-out';should change to@use 'components/callout'; - The rebuilt Callout doesn't feature integrated brand logos. Use Logo and Wordmark components instead.
- The rebuilt Compact Callout lacks an integrated logo, so it no longer positions the logo at one end of the component. A Logo or Wordmark component should appear in the body instead.
- Convert any instances of the Hero component to either Split or Callout.
- Convert any instances of the Picto Card component to Picto.
18.0.0
What's Changed
- css: Replace
get-theme,type-scalefunctions and theme and type-scale maps with CSS Custom Properties. Sass variables added for legacy support - css: Migrates the sass
@importwith@useand@forward(#755).
Migration Tips
- This version updates how we internally import SCSS files, from the
@importsyntax to@useand@forward - When importing
libat the head of your project you will use thewithkeyword instead of
stating variables explicitly, like this:
@use '/assets/sass/protocol/includes/lib' with ($font-path: '/protocol/fonts');- To use the global namespace for protocol variables you will need to use the
askeyword and assign to*:
@use '../includes/lib' as *;- if you don't use
asyou would access variables and mixins from the file using the filename as a namespace:
@use '../includes/lib';
.mzp-c-item {
@include lib.text-title-md;
color: lib.$color-ink-80;
margin: lib.$spacing-lg 0;
}-
For more information on the
@useand@forwardyou can visit the offical SCSS documentation or the usage page on the Protocol documentation website -
This version also moves from using the
get-themefunction to using css custom properties. A future version of protocol will depreciate both theget-themeandtype-scalefunctions. -
To migrate from
get-themeortype-scaleto CSS custom properties, follow this pattern: -
From this:
.mzp-t-dark {
background-color: get-theme('background-color-inverse');
color: get-theme('body-text-color-inverse');
line-height: type-scale('body-line-height');
}- to this:
- (Note: if you need to support legacy browsers, place the CSS custom properties in a
@supportsflag and use sass variables as a fall back. Legacy browsers will always be served the default theme.)
.mzp-t-dark {
background-color: $background-color-inverse;
color: $body-text-color-inverse;
line-height: $body-line-height;
@supports (--css: variables) {
background-color: var(--background-color-inverse);
color: var(--body-text-color-inverse);
line-height: var(--body-line-height);
}
}- For more information on CSS custom properties you can visit MDN's documentation or the framework page Protocol's documentation website.