File tree 2 files changed +35
-0
lines changed
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ module.exports = {
12
12
saturate : false ,
13
13
sepia : false ,
14
14
backdropBlur : false ,
15
+ backdropBrightness : false ,
15
16
} ,
16
17
blur : plugin ( function ( { matchUtilities, theme } ) {
17
18
matchUtilities (
@@ -115,4 +116,14 @@ module.exports = {
115
116
{ values : theme ( 'backdropBlur' ) }
116
117
)
117
118
} ) ,
119
+ backdropBrightness : plugin ( function ( { matchUtilities, theme } ) {
120
+ matchUtilities (
121
+ {
122
+ 'backdrop-brightness' : ( value ) => ( {
123
+ backdropFilter : `brightness(${ value } )`
124
+ } ) ,
125
+ } ,
126
+ { values : theme ( 'backdropBrightness' ) }
127
+ )
128
+ } ) ,
118
129
}
Original file line number Diff line number Diff line change @@ -326,4 +326,28 @@ describe('Filters', () => {
326
326
` )
327
327
} )
328
328
} )
329
+
330
+ test ( 'backdropBrightness' , ( ) => {
331
+ const config = {
332
+ content : [
333
+ {
334
+ raw : String . raw `
335
+ <hr class="backdrop-brightness-50">
336
+ <hr class="backdrop-brightness-[1.75]">
337
+ `
338
+ }
339
+ ] ,
340
+ }
341
+
342
+ return run ( config ) . then ( result => {
343
+ expect ( result . css ) . toMatchCss ( String . raw `
344
+ .backdrop-brightness-50 {
345
+ backdrop-filter: brightness(.5)
346
+ }
347
+ .backdrop-brightness-\[1\.75\] {
348
+ backdrop-filter: brightness(1.75)
349
+ }
350
+ ` )
351
+ } )
352
+ } )
329
353
} )
You can’t perform that action at this time.
0 commit comments