Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS: "z-index: 902;" after build become "z-index:#902;" #20970

Closed
1 task done
cesco69 opened this issue May 27, 2021 · 6 comments
Closed
1 task done

CSS: "z-index: 902;" after build become "z-index:#902;" #20970

cesco69 opened this issue May 27, 2021 · 6 comments

Comments

@cesco69
Copy link

cesco69 commented May 27, 2021

🐞 Bug report

Command (mark with an x)

  • build

Description

the source css of a component:

#particles-js {
    z-index: 902;
}

after the build become (901 become #901):

#particles-js {
    z-index:#902;
}

🔬 Minimal Reproduction

Step 1: create a component

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: `<div id="particles-js"></div>`,
  styles: [`
    #particles-js {
        z-index: 902;
    }
  `]
})
export class AppComponent {
  title = 'my-app';
}

Step 2: make a build with

ng build

output in index.html

<style>
#particles-js[_ngcontent-fpy-c98]{z-index:#901;}
<style>

with ng serve it works:

<style>
#particles-js[_ngcontent-reu-c11] {
  z-index: 902;
}
<style>

🌍 Your Environment


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 12.0.2
Node: 12.22.1
Package Manager: npm 6.14.12
OS: win32 x64

Angular: 12.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.2
@angular-devkit/build-angular   12.0.2
@angular-devkit/core            12.0.2
@angular-devkit/schematics      12.0.2
@schematics/angular             12.0.2
rxjs                            6.6.7
typescript                      4.2.4

@alan-agius4
Copy link
Collaborator

Duplicate of #20918

@alan-agius4 alan-agius4 marked this as a duplicate of #20918 May 27, 2021
@cesco69
Copy link
Author

cesco69 commented May 27, 2021

My build is make into docker container (gitlab-ci). Node modules are installed fresh every build.

@alan-agius4
Copy link
Collaborator

Doesn’t matter if you have a package-lock.json.

@cesco69
Copy link
Author

cesco69 commented May 27, 2021

Yes, I have it... For fix, i need to delete package-lock.json make a clean npm install and rebuild?

@alan-agius4
Copy link
Collaborator

Yes

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants