angular/packages/compiler/src
P4 97fb86d331 perf(core): set encapsulation to None for empty component styles (#57130)
Make it so that encapsulation for empty styles, styles containing only whitespace and comments, etc.
is handled the same way as with no styles at all.

Components without styles already have view encapsulation set to `None`
to avoid generating unnecessary attributes for style scoping, like `_ngcontent-ng-c1` (#27175)

If the component has an empty external styles file instead, the compiler would generate
a component definition without the `styles` field, but still using the default encapsulation.
This can result in runtime overhead if the developer forgets to delete the empty styles file
generated automatically for new components by Angular CLI.

Closes #16602

PR Close #57130
2024-10-08 09:30:01 -07:00
..
expression_parser refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
i18n refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
ml_parser refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
output refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
render3 perf(core): set encapsulation to None for empty component styles (#57130) 2024-10-08 09:30:01 -07:00
schema refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
template/pipeline fix(compiler): this.a should always refer to class property a (#55183) 2024-10-08 16:02:18 +00:00
template_parser refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
assertions.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
chars.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
compiler.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
compiler_facade_interface.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
config.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
constant_pool.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
core.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
injectable_compiler_2.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
jit_compiler_facade.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
parse_util.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
resource_loader.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
selector.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
shadow_css.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
style_url_resolver.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
util.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
version.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00