SharePoint Online development piece: the preparation of specifications share foreground UI interface

Blog link: https://blog.51cto.com/13969817
In many cases, enterprises in order to meet their own UI strategy, the usual practice is to develop a set of Portal staff Customized to meet the company's standards, so during development, we must Note that the preparation of specifications, otherwise the cost of future maintenance on a lot, here to share with you the experience.

1. Follow Protal associated css and JS encoding specifications

  • class naming requires the use of the project name plus "-" and the specific name. For example: jx-news-title. Try not to cover modifications and SharePoint default style
  • The remaining coding standard to follow CSS coding conventions

    Example:

    / Bad CSS / .selector, .selector-secondary, .selector[type=text] { padding:15px; margin:0px 0px 15px; background-color:rgba(0, 0, 0, 0.5); box-shadow:0px 1px 2px #CCC,inset 0 1px 0 #FFFFFF }

    / Good CSS / .selector, .selector-secondary, .selector[type="text"] { padding: 15px; margin-bottom: 15px; background-color: rgba(0,0,0,.5); box-shadow: 0 1px 2px #ccc, inset 0 1px 0 #fff; }

2. To consider the network latency, we need to do js and css confusion and compression processing

Can be used in the development of the original js and css, but once available to customers when the need for js and css obfuscate and compression processing, this can greatly reduce the size of javascript and css files. In large network delay time can quickly load the corresponding file.

Here's hoping to share with experience, can play a valuable role

Guess you like

Origin blog.51cto.com/13969817/2466543