File tree Expand file tree Collapse file tree 4 files changed +39
-4
lines changed Expand file tree Collapse file tree 4 files changed +39
-4
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,16 @@ sass_binary(
137
137
],
138
138
)
139
139
140
+ sass_binary (
141
+ name = "theme_token_api" ,
142
+ src = "theme-token-api.scss" ,
143
+ deps = [
144
+ "//src/material:sass_lib" ,
145
+ "//src/material-experimental:sass_lib" ,
146
+ "//src/material/core:theming_scss_lib" ,
147
+ ],
148
+ )
149
+
140
150
# Variables that are going to be inlined into the dev app index.html.
141
151
filegroup (
142
152
name = "variables" ,
@@ -154,6 +164,7 @@ filegroup(
154
164
"favicon.ico" ,
155
165
"index.html" ,
156
166
":theme" ,
167
+ ":theme_token_api" ,
157
168
":variables" ,
158
169
"//src/dev-app/icon:icon_demo_assets" ,
159
170
"@npm//:node_modules/moment/min/moment-with-locales.min.js" ,
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
9
- import { Component , ViewEncapsulation } from '@angular/core' ;
10
- import { RouterModule } from '@angular/router' ;
9
+ import { Component , inject , ViewEncapsulation } from '@angular/core' ;
10
+ import { ActivatedRoute , RouterModule } from '@angular/router' ;
11
11
import { DevAppLayout } from './dev-app/dev-app-layout' ;
12
12
13
13
/** Root component for the dev-app demos. */
@@ -18,4 +18,14 @@ import {DevAppLayout} from './dev-app/dev-app-layout';
18
18
standalone : true ,
19
19
imports : [ DevAppLayout , RouterModule ] ,
20
20
} )
21
- export class DevApp { }
21
+ export class DevApp {
22
+ route = inject ( ActivatedRoute ) ;
23
+
24
+ constructor ( ) {
25
+ this . route . queryParams . subscribe ( q => {
26
+ ( document . querySelector ( '#theme-styles' ) as any ) . href = q . hasOwnProperty ( 'tokenapi' )
27
+ ? 'theme-token-api.css'
28
+ : 'theme.css' ;
29
+ } ) ;
30
+ }
31
+ }
Original file line number Diff line number Diff line change 10
10
< link rel ="preconnect " href ="https://fonts.gstatic.com ">
11
11
< link href ="https://fonts.googleapis.com/icon?family=Material+Icons " rel ="stylesheet ">
12
12
< link href ="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap " rel ="stylesheet ">
13
- < link href ="theme.css " rel ="stylesheet ">
13
+ < link href ="theme.css " rel ="stylesheet " id =" theme-styles " >
14
14
15
15
<!-- FontAwesome for mat-icon demo. -->
16
16
< link rel ="stylesheet " href ="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css ">
Original file line number Diff line number Diff line change
1
+ dev-app {
2
+ & ::before {
3
+ content : ' Using experimental theming API' ;
4
+ display : inline-block ;
5
+ position : fixed ;
6
+ z-index : 100 ;
7
+ bottom : 0 ;
8
+ left : 50% ;
9
+ transform : translateX (-50% );
10
+ padding : 8px ;
11
+ background : red ;
12
+ color : white ;
13
+ }
14
+ }
You can’t perform that action at this time.
0 commit comments