File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -224,23 +224,25 @@ export default class EditorFile {
224224 href : "./res/file-icons/style.css" ,
225225 } ) ;
226226
227- const content = tag ( "div" , {
228- className : "tab-page-content" ,
229- } ) ;
230- content . appendChild ( options . content ) ;
231-
232- // Add stylesheet and content to shadow DOM
227+ // Add base styles to shadow DOM first
233228 shadow . appendChild ( mainStyle ) ;
234229 shadow . appendChild ( iconStyle ) ;
235230 shadow . appendChild ( fileIconStyle ) ;
236- shadow . appendChild ( content ) ;
237-
238- this . #content = container ;
239231
240232 // Handle custom stylesheets if provided
241233 if ( options . stylesheets ) {
242234 this . #addCustomStyles( options . stylesheets , shadow ) ;
243235 }
236+
237+ const content = tag ( "div" , {
238+ className : "tab-page-content" ,
239+ } ) ;
240+ content . appendChild ( options . content ) ;
241+
242+ // Append content container to shadow DOM
243+ shadow . appendChild ( content ) ;
244+
245+ this . #content = container ;
244246 } else {
245247 this . #content = options . content ;
246248 }
You can’t perform that action at this time.
0 commit comments