Is it possible to create more than one global CSS file in Angular?
up vote
1
down vote
favorite
I would have two global CSS files in my application, so I try to do it by:
- creating new file (as sibling of
styles.css
in the folder structure) - add lines in
angular.json
in: "build" -> "styles" and "test" -> "styles".
Unfortunately it doesn't work, so my question is: did I make something wrong or is it impossible to have two global CSS files supported by Angular (I skipped option with adding css file in index.html
)?
css angular
|
show 1 more comment
up vote
1
down vote
favorite
I would have two global CSS files in my application, so I try to do it by:
- creating new file (as sibling of
styles.css
in the folder structure) - add lines in
angular.json
in: "build" -> "styles" and "test" -> "styles".
Unfortunately it doesn't work, so my question is: did I make something wrong or is it impossible to have two global CSS files supported by Angular (I skipped option with adding css file in index.html
)?
css angular
Seems to work fine in a StackBlitz stackblitz.com/edit/angular-wvje8u?file=angular.json
– user184994
2 days ago
1. I didn't see in debugger->web to see that my file is downloaded. 2. Class-style didn't apply (I even tried to paste same style in styles.css to compare and style is good).
– 3D_fun
2 days ago
1
I don't think you will see it being downloaded, because I believe the build process adds it into the index.html file
– user184994
2 days ago
File 'styles.css' is visible in debugger so I think my own should be too. I test method from source post in stackblitz and there it works. I don't know what the difference in my app that it doesn't work.
– 3D_fun
2 days ago
Did you make sure to stop the app, and dong serve
again?
– user184994
2 days ago
|
show 1 more comment
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I would have two global CSS files in my application, so I try to do it by:
- creating new file (as sibling of
styles.css
in the folder structure) - add lines in
angular.json
in: "build" -> "styles" and "test" -> "styles".
Unfortunately it doesn't work, so my question is: did I make something wrong or is it impossible to have two global CSS files supported by Angular (I skipped option with adding css file in index.html
)?
css angular
I would have two global CSS files in my application, so I try to do it by:
- creating new file (as sibling of
styles.css
in the folder structure) - add lines in
angular.json
in: "build" -> "styles" and "test" -> "styles".
Unfortunately it doesn't work, so my question is: did I make something wrong or is it impossible to have two global CSS files supported by Angular (I skipped option with adding css file in index.html
)?
css angular
css angular
asked 2 days ago
3D_fun
808
808
Seems to work fine in a StackBlitz stackblitz.com/edit/angular-wvje8u?file=angular.json
– user184994
2 days ago
1. I didn't see in debugger->web to see that my file is downloaded. 2. Class-style didn't apply (I even tried to paste same style in styles.css to compare and style is good).
– 3D_fun
2 days ago
1
I don't think you will see it being downloaded, because I believe the build process adds it into the index.html file
– user184994
2 days ago
File 'styles.css' is visible in debugger so I think my own should be too. I test method from source post in stackblitz and there it works. I don't know what the difference in my app that it doesn't work.
– 3D_fun
2 days ago
Did you make sure to stop the app, and dong serve
again?
– user184994
2 days ago
|
show 1 more comment
Seems to work fine in a StackBlitz stackblitz.com/edit/angular-wvje8u?file=angular.json
– user184994
2 days ago
1. I didn't see in debugger->web to see that my file is downloaded. 2. Class-style didn't apply (I even tried to paste same style in styles.css to compare and style is good).
– 3D_fun
2 days ago
1
I don't think you will see it being downloaded, because I believe the build process adds it into the index.html file
– user184994
2 days ago
File 'styles.css' is visible in debugger so I think my own should be too. I test method from source post in stackblitz and there it works. I don't know what the difference in my app that it doesn't work.
– 3D_fun
2 days ago
Did you make sure to stop the app, and dong serve
again?
– user184994
2 days ago
Seems to work fine in a StackBlitz stackblitz.com/edit/angular-wvje8u?file=angular.json
– user184994
2 days ago
Seems to work fine in a StackBlitz stackblitz.com/edit/angular-wvje8u?file=angular.json
– user184994
2 days ago
1. I didn't see in debugger->web to see that my file is downloaded. 2. Class-style didn't apply (I even tried to paste same style in styles.css to compare and style is good).
– 3D_fun
2 days ago
1. I didn't see in debugger->web to see that my file is downloaded. 2. Class-style didn't apply (I even tried to paste same style in styles.css to compare and style is good).
– 3D_fun
2 days ago
1
1
I don't think you will see it being downloaded, because I believe the build process adds it into the index.html file
– user184994
2 days ago
I don't think you will see it being downloaded, because I believe the build process adds it into the index.html file
– user184994
2 days ago
File 'styles.css' is visible in debugger so I think my own should be too. I test method from source post in stackblitz and there it works. I don't know what the difference in my app that it doesn't work.
– 3D_fun
2 days ago
File 'styles.css' is visible in debugger so I think my own should be too. I test method from source post in stackblitz and there it works. I don't know what the difference in my app that it doesn't work.
– 3D_fun
2 days ago
Did you make sure to stop the app, and do
ng serve
again?– user184994
2 days ago
Did you make sure to stop the app, and do
ng serve
again?– user184994
2 days ago
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Changes to angular.json
are not picked up automatically.
You will need to stop the app, and do ng serve
again
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Changes to angular.json
are not picked up automatically.
You will need to stop the app, and do ng serve
again
add a comment |
up vote
0
down vote
accepted
Changes to angular.json
are not picked up automatically.
You will need to stop the app, and do ng serve
again
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Changes to angular.json
are not picked up automatically.
You will need to stop the app, and do ng serve
again
Changes to angular.json
are not picked up automatically.
You will need to stop the app, and do ng serve
again
answered 2 days ago
user184994
10.5k11426
10.5k11426
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239187%2fis-it-possible-to-create-more-than-one-global-css-file-in-angular%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Seems to work fine in a StackBlitz stackblitz.com/edit/angular-wvje8u?file=angular.json
– user184994
2 days ago
1. I didn't see in debugger->web to see that my file is downloaded. 2. Class-style didn't apply (I even tried to paste same style in styles.css to compare and style is good).
– 3D_fun
2 days ago
1
I don't think you will see it being downloaded, because I believe the build process adds it into the index.html file
– user184994
2 days ago
File 'styles.css' is visible in debugger so I think my own should be too. I test method from source post in stackblitz and there it works. I don't know what the difference in my app that it doesn't work.
– 3D_fun
2 days ago
Did you make sure to stop the app, and do
ng serve
again?– user184994
2 days ago