码迷,mamicode.com
首页 > 其他好文 > 详细

[Angular] Separating Structural Styles From Theme Styles - Making Components Themeable

时间:2017-06-11 10:15:25      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:focus   tin   style   related   for   out   efault   border   logs   

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;
}

 

[Angular] Separating Structural Styles From Theme Styles - Making Components Themeable

标签:focus   tin   style   related   for   out   efault   border   logs   

原文地址:http://www.cnblogs.com/Answer1215/p/6980888.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!