File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,14 @@ export function isSupportBackdropFilter() {
66 if ( CSS && CSS . supports ) {
77 return CSS . supports ( "backdrop-filter" , propertyValue ) ;
88 } else {
9- const { style } = document . createElement ( "div" ) ;
9+ let elm = document . createElement ( "div" ) ;
10+ const { style } = elm ;
1011 isSupported = style [ propertyName ] !== void 0 ;
1112 if ( isSupported ) {
1213 style [ propertyName ] = propertyValue ;
1314 isSupported = style . cssText . length !== 0 ;
1415 }
16+ elm = null ;
1517
1618 return isSupported ;
1719 }
Original file line number Diff line number Diff line change 1+ import { isSupportBackdropFilter } from "../common/browser/backdropFilterDetector" ;
2+
3+ export function getAcrylicTextureStyle ( ) : CSSStyleDeclaration {
4+ const isSupported = isSupportBackdropFilter ( ) ;
5+ let style : CSSStyleDeclaration ;
6+ if ( isSupported ) {
7+ style = {
8+ /**
9+ * Add theme.baseLow color.
10+ */
11+ backgroundColor : "" ,
12+ /**
13+ * Add noise texture.
14+ */
15+ backgroundImage : "" ,
16+ /**
17+ * Add blur filter.
18+ */
19+ backdropFilter : "blur(10px)"
20+ } as any ;
21+ } else {
22+ style = {
23+ /**
24+ * Add polyfill texture theme.acrylicText40.
25+ */
26+ background : ""
27+ } as CSSStyleDeclaration ;
28+ }
29+
30+ return style ;
31+ }
You can’t perform that action at this time.
0 commit comments