[Angular] Alternative Themes - Learn the Host-Context Selector
Angular The Context Host Learn Selector
2023-09-14 08:59:18 时间
To add alernative theme, we can use :host-context() selector from Angular.
//au-fa-input-red-theme.css :host-context(.au-fa-input-red-theme) { border-color: red; }
So it will apply 'border-color: red' only when host wrapper element has 'au-fa-input-red-theme' class.
<div class="form-row au-fa-input-red-theme"> <label>Email:</label> <au-fa-input id="email-field" icon="envelope"> <input type="email" name="email" placeholder="Email" autocomplete="off" class="test-class"> </au-fa-input> </div>
相关文章
- HTTP Status 400 - description The request sent by the client was syntactically incorrect.
- 【异常】The dependencies of some of the beans in the application context form a cycle
- [Angular] Introduction to Angular Internationalization (i18n)
- [Angular] Content Projection with ng-content
- [Angular 2] *ngFor
- [Angular 2] Using the @Inject decorator
- [AngularJS] Using the LocalForage library for offline storage with Angular
- [Angular] Understanding the Angular Component providers property
- [Angular 9] Improved Dependency Injection with the new providedIn scopes 'any' and 'platform'
- [Angular] Custom directive Form validator
- [Angular 2] Using a Value from the Store in a Reducer
- [Angular] In angular world and out angular world
- AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.
- Angular Universal 应用避免 SSR hang 的一些指导方针
- Angular HttpClient.get的实现单步调试
- Angular view container删除view实例的过程
- 为什么按照 Angular 官网教程执行简单的测试代码,会遇到expect is not defined的错误消息
- Angular内部对template的处理学习笔记
- 【华为云技术分享】三大前端技术(React,Vue,Angular)探密(下)
- 问题解决:The connection to the server xxxxx:6443 was refused - did you specify the right host or port?
- 存在隐患 : 3 racks are required for the erasure coding policies: RS-6-3-1024k. The number of racks is on
- git push报错 fatal: The current branch master has no upstream branch. To push the current