File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,6 +130,24 @@ class MacPatternShowcase {
130130 return patterns ;
131131 }
132132
133+ createBackgroundPattern ( pattern ) {
134+ const canvasSize = 8 ;
135+ const canvas = document . createElement ( "canvas" ) ;
136+ canvas . width = canvasSize ;
137+ canvas . height = canvasSize ;
138+ const ctx = canvas . getContext ( "2d" ) ;
139+
140+ for ( let y = 0 ; y < 8 ; y ++ ) {
141+ for ( let x = 0 ; x < 8 ; x ++ ) {
142+ const bit = pattern . binaryPattern [ y ] [ x ] ;
143+ ctx . fillStyle = bit ? '#000000' : '#ffffff' ;
144+ ctx . fillRect ( x , y , 1 , 1 ) ;
145+ }
146+ }
147+
148+ return canvas . toDataURL ( ) ;
149+ }
150+
133151 createPageBackgroundPattern ( pattern ) {
134152 // Create a "fat bits" background pattern - scale 8x8 for chunky pixelation
135153 const scale = 4 ;
@@ -235,6 +253,9 @@ class MacPatternShowcase {
235253
236254 this . patternsGrid . appendChild ( patternElement ) ;
237255 } ) ;
256+
257+ const standardGray = this . createBackgroundPattern ( this . patterns [ 3 ] ) ;
258+ this . patternsGrid . style . backgroundImage = `url(${ standardGray } )` ;
238259 }
239260
240261 setupEventListeners ( ) {
Original file line number Diff line number Diff line change 2424 );
2525 --surface-secondary : light-dark (# f8f8f8, # 2a2a2a );
2626 --border-primary : light-dark (# ddd, # 555 );
27- --border-hover : light-dark (# 999 , # ccc );
28- --border-active : light-dark (# 999 , # ccc );
27+ --border-hover : light-dark (# 666 , # 999 );
28+ --border-active : light-dark (# 666 , # 999 );
2929 --button-primary : light-dark (# 666666, # 4a9fff );
3030 --button-primary-hover : light-dark (# 555555, # 2b7fe8 );
3131 --button-secondary : light-dark (# f8f9fa, # 3a3a3a );
You can’t perform that action at this time.
0 commit comments