Skip to content
Merged
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
9 changes: 9 additions & 0 deletions packages/fxa-content-server/grunttasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ module.exports = function (grunt) {
// Update leaf node font and image URLs in the CSS bundle.
'usemin:css',

// Tailwind 3.4.1 changed ltr: and rtl: classes to use a `:where... &` selector
// that can output an asterisk selector, e.g. `:where([dir="rtl"] *)`. Our `cssmin`
// grunttask minifies this to `:where([dir="rtl"]*)`, removing the space, which
// causes the style not to load. clean-css does not offer any formatting options
// to fix this for us, and since we plan to sunset content-server anyway and this
// is not a problem in our minification process for Settings, this is a temp hack
// that replaces `]*` with `] *` in our content-server Tailwind CSS file.
'replace:cssSelectorFix',

// URLs inside the resources with children have been updated
// and SRI hashes added to the main JS bundle. These files
// are in their final state and can now be revved.
Expand Down
18 changes: 18 additions & 0 deletions packages/fxa-content-server/grunttasks/replace.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

module.exports = function (grunt) {
grunt.config('replace', {
cssSelectorFix: {
src: ['<%= yeoman.dist %>/styles/tailwind.out.css'],
overwrite: true,
replacements: [
{
from: /](?=\*)/g,
to: '] ',
},
],
},
});
};