Thought & </code>


  • Home

  • Categories

  • About

  • Archives

  • Tags

  • Search

Build an Angular2 Library with Webpack

Posted on 2016-09-06   |   In Angular , Webpack   |  
How to build an Angular2 Library with Webpack
Read more »

Hexo got error on deploying to github

Posted on 2016-09-02   |   In Blog , Hexo   |  
handle "could not read Username" error when deploying Hexo blog to github
Read more »

CSS namespacing/ architecture idea

Posted on 2016-09-01   |   In CSS   |  

Just come across an interesting idea for CSS

In a word, prefixed the class name with an indicator of the class' purpose and scope.

  • .o- // an object, an unstyled design pattern
  • .c- // a component, a styled piece of UI
  • .a- // an alteration, an UI-independent override
  • .t- // a theme, change UI appearance based on theme
  • .is-, .has-, .for- // state-based styles
  • .js- // used for binding behavior to components

In each layer of the inverted triangle, the scope of the styles get narrower and more specific. At the bottom of this is a layer of utility or helper classes, referred to as “trumps”, that contains high-specificity selectors (ref).

This probably become less important now when using Angular2 component with style attached, but still a good thought.

more:

  • Manage large-scale web projects with new CSS architecture ITCSS
  • More Transparent UI Code with Namespaces

Image path in github page

Posted on 2016-09-01   |   In Blog , Github page   |  

Another detail.

I was woundering why some images were missing on my github page generated by Hexo but showed correctly on local Hexo server.

It turns out the image path for Githut page is case-sensitive !

case closed.

ionic2 with Visual Studio + IIS Express

Posted on 2016-08-31   |   In Ionic2   |  
Developing Ionic2 on VS2015 with IIS Express
Read more »
1…567…10
Sam Lin

Sam Lin

48 posts
37 categories
56 tags
RSS
© 2012 - 2017 Sam Lin
Powered by Hexo
NexT.Mist