zoukankan      html  css  js  c++  java
  • [Angular] Separating Structural Styles From Theme Styles

    For the component's css file, we can improt two css files:

    • common.css
    • default-theme.css
    @import "common.css";
    @import "au-fa-input-default-theme.css";

    In the default theme, it contains all the default theme related style.

    :host {
      border-color: lightgrey;
    }
    
    :host(.input-focus) {
      border-color: #4D90FE;
      -webkit-box-shadow: 0 0 5px  #4D90FE;
      box-shadow: 0 0 5px  #4D90FE;
    }

    In the common.css, it contains all the common style for different themes:

    /*Common for all input fields*/
    .icon {
      width:20px;
      text-align: center;
      padding-left: 5px;
      padding-right: 2px;
      border:none;
      vertical-align: middle;
    }
    
    :host {
      border-width:1px;
      border-style: solid;
      padding: 1px 0;
      display: inline-block;
    }
    
    :host(.input-focus) {
      outline: none;
    }
    
    :host /deep/ input {
      border:none ;
      outline: none;
      height: 100%;
      box-sizing: border-box;
    }
  • 相关阅读:
    75. 颜色分类
    排序链表
    两个数组的交集
    242. 有效的字母异位词
    排序优化
    622.设计循环队列
    比较含退格的字符串
    682.棒球比赛
    496.下一个更大的元素I
    线性排序算法
  • 原文地址:https://www.cnblogs.com/Answer1215/p/6980888.html
Copyright © 2011-2022 走看看