File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import { html , LitElement } from 'lit' ;
88
99/**
10- * TODO(b/265336902): add docs
10+ * An icon element.
1111 */
1212export class Icon extends LitElement {
1313 protected override render ( ) {
Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7- import '@material/web/icon/icon.js' ;
87import '@material/web/labs/gb/components/fab/md-fab.js' ;
8+ import '@material/web/labs/gb/styles/icon/md-icon.js' ;
99
1010import { MaterialStoryInit } from './material-collection.js' ;
1111import { FabColor , FabSize } from '@material/web/labs/gb/components/fab/fab.js' ;
Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7- import '@material/web/icon/icon.js' ;
87import '@material/web/labs/gb/components/iconbutton/md-icon-button.js' ;
8+ import '@material/web/labs/gb/styles/icon/md-icon.js' ;
99
1010import { MaterialStoryInit } from './material-collection.js' ;
1111import {
Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7- import '@material/web/icon/icon.js' ;
87import '@material/web/labs/gb/components/list/md-list.js' ;
98import '@material/web/labs/gb/components/list/md-list-item.js' ;
9+ import '@material/web/labs/gb/styles/icon/md-icon.js' ;
1010
1111import { MaterialStoryInit } from './material-collection.js' ;
1212import { styles as checkboxStyles } from '@material/web/labs/gb/components/checkbox/checkbox.cssresult.js' ;
Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7- import '@material/web/icon/icon.js' ;
87import '@material/web/labs/gb/components/switch/md-switch.js' ;
8+ import '@material/web/labs/gb/styles/icon/md-icon.js' ;
99
1010import { MaterialStoryInit } from './material-collection.js' ;
1111import { adoptStyles } from '@material/web/labs/gb/styles/adopt-styles.js' ;
Original file line number Diff line number Diff line change 4040}
4141
4242@layer md.sys.icon {
43- .md-icon {
43+ .md-icon ,
44+ :host (.md-icon ) {
4445 display : inline-flex ;
4546 place-items : center ;
4647 place-content : center ;
Original file line number Diff line number Diff line change 1+ /**
2+ * @license
3+ * Copyright 2026 Google LLC
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ import { type CSSResultOrNative } from 'lit' ;
8+ import { customElement } from 'lit/decorators.js' ;
9+ import { Icon as IconBase } from '../../../../icon/internal/icon.js' ;
10+
11+ import iconStyles from './md-icon.css' with { type : 'css' } ; // github-only
12+ // import iconStyles from './md-icon.cssresult.js'; // google3-only
13+
14+ declare global {
15+ interface HTMLElementTagNameMap {
16+ /** A Material Design icon component. */
17+ 'md-icon' : Icon ;
18+ }
19+ }
20+
21+ /**
22+ * A Material Design icon component.
23+ */
24+ @customElement ( 'md-icon' )
25+ export class Icon extends IconBase {
26+ static override styles : CSSResultOrNative [ ] = [ iconStyles ] ;
27+
28+ override connectedCallback ( ) {
29+ super . connectedCallback ( ) ;
30+ this . classList . add ( 'md-icon' ) ;
31+ }
32+ }
Original file line number Diff line number Diff line change 99@import ' icon/md-icon' ;
1010@import ' motion/md-motion-tokens-easing' ;
1111@import ' shape/md-shape-tokens' ;
12+ @import ' space/md-space-tokens' ;
1213@import ' typography/md-typography-tokens' ;
1314// go/keep-sorted end
Original file line number Diff line number Diff line change 1+ /* !
2+ * Copyright 2026 Google LLC
3+ * SPDX-License-Identifier: Apache-2.0
4+ */
5+
6+ @layer md.sys.space {
7+ :root {
8+ --md-sys-space-unit : 8px ;
9+ --md-sys-space-0 : calc (var (--md-sys-space-unit ) * 0 );
10+ --md-sys-space-25 : calc (var (--md-sys-space-unit ) * 0.25 );
11+ --md-sys-space-50 : calc (var (--md-sys-space-unit ) * 0.5 );
12+ --md-sys-space-75 : calc (var (--md-sys-space-unit ) * 0.75 );
13+ --md-sys-space-100 : var (--md-sys-space-unit );
14+ --md-sys-space-125 : calc (var (--md-sys-space-unit ) * 1.25 );
15+ --md-sys-space-150 : calc (var (--md-sys-space-unit ) * 1.5 );
16+ --md-sys-space-175 : calc (var (--md-sys-space-unit ) * 1.75 );
17+ --md-sys-space-200 : calc (var (--md-sys-space-unit ) * 2 );
18+ --md-sys-space-250 : calc (var (--md-sys-space-unit ) * 2.5 );
19+ --md-sys-space-300 : calc (var (--md-sys-space-unit ) * 3 );
20+ --md-sys-space-400 : calc (var (--md-sys-space-unit ) * 4 );
21+ --md-sys-space-450 : calc (var (--md-sys-space-unit ) * 4.5 );
22+ --md-sys-space-500 : calc (var (--md-sys-space-unit ) * 5 );
23+ --md-sys-space-600 : calc (var (--md-sys-space-unit ) * 6 );
24+ --md-sys-space-700 : calc (var (--md-sys-space-unit ) * 7 );
25+ --md-sys-space-800 : calc (var (--md-sys-space-unit ) * 8 );
26+ --md-sys-space-900 : calc (var (--md-sys-space-unit ) * 9 );
27+ }
28+ }
Original file line number Diff line number Diff line change 135135 --shadow-2xl : initial ; // Material does not have a 2xl shadow.
136136
137137 // Space
138- --spacing : 8 px ;
138+ --spacing : var ( --md-sys-space-unit ) ;
139139
140140 // Breakpoints
141141 --breakpoint-sm : 600px ; // medium
You can’t perform that action at this time.
0 commit comments