1
-
2
1
// Copyright 2021 The Chromium Authors. All rights reserved.
3
2
// Use of this source code is governed by a BSD-style license that can be
4
3
// found in the LICENSE file.
@@ -10,11 +9,7 @@ import * as Buttons from '../../../ui/components/buttons/buttons.js';
10
9
import * as UI from '../../../ui/legacy/legacy.js' ;
11
10
import { html , render } from '../../../ui/lit/lit.js' ;
12
11
13
- import hideIssuesMenuStylesRaw from './hideIssuesMenu.css.js' ;
14
-
15
- // TODO(crbug.com/391381439): Fully migrate off of constructed style sheets.
16
- const hideIssuesMenuStyles = new CSSStyleSheet ( ) ;
17
- hideIssuesMenuStyles . replaceSync ( hideIssuesMenuStylesRaw . cssText ) ;
12
+ import hideIssuesMenuStyles from './hideIssuesMenu.css.js' ;
18
13
19
14
const UIStrings = {
20
15
/**
@@ -42,10 +37,6 @@ export class HideIssuesMenu extends HTMLElement {
42
37
this . #render( ) ;
43
38
}
44
39
45
- connectedCallback ( ) : void {
46
- this . #shadow. adoptedStyleSheets = [ hideIssuesMenuStyles ] ;
47
- }
48
-
49
40
onMenuOpen ( event : Event ) : void {
50
41
event . stopPropagation ( ) ;
51
42
const buttonElement = this . #shadow. querySelector ( 'devtools-button' ) ;
@@ -62,6 +53,7 @@ export class HideIssuesMenu extends HTMLElement {
62
53
// Disabled until https://crbug.com/1079231 is fixed.
63
54
// clang-format off
64
55
render ( html `
56
+ < style > ${ hideIssuesMenuStyles . cssText } </ style >
65
57
< devtools-button
66
58
.data =${ { variant : Buttons . Button . Variant . ICON , iconName : 'dots-vertical' , title : i18nString ( UIStrings . tooltipTitle ) } as Buttons . Button . ButtonData }
67
59
.jslogContext =${ 'hide-issues' }
0 commit comments