File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
packages/fxa-content-server/grunttasks Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,15 @@ module.exports = function (grunt) {
48
48
// Update leaf node font and image URLs in the CSS bundle.
49
49
'usemin:css' ,
50
50
51
+ // Tailwind 3.4.1 changed ltr: and rtl: classes to use a `:where... &` selector
52
+ // that can output an asterisk selector, e.g. `:where([dir="rtl"] *)`. Our `cssmin`
53
+ // grunttask minifies this to `:where([dir="rtl"]*)`, removing the space, which
54
+ // causes the style not to load. clean-css does not offer any formatting options
55
+ // to fix this for us, and since we plan to sunset content-server anyway and this
56
+ // is not a problem in our minification process for Settings, this is a temp hack
57
+ // that replaces `]*` with `] *` in our content-server Tailwind CSS file.
58
+ 'replace:cssSelectorFix' ,
59
+
51
60
// URLs inside the resources with children have been updated
52
61
// and SRI hashes added to the main JS bundle. These files
53
62
// are in their final state and can now be revved.
Original file line number Diff line number Diff line change
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
+
5
+ module . exports = function ( grunt ) {
6
+ grunt . config ( 'replace' , {
7
+ cssSelectorFix : {
8
+ src : [ '<%= yeoman.dist %>/styles/tailwind.out.css' ] ,
9
+ overwrite : true ,
10
+ replacements : [
11
+ {
12
+ from : / ] (? = \* ) / g,
13
+ to : '] ' ,
14
+ } ,
15
+ ] ,
16
+ } ,
17
+ } ) ;
18
+ } ;
You can’t perform that action at this time.
0 commit comments