We use Bootstrap 3 as our base CSS framework. This provides a grid layout, CSS normalization, and some common styles.
Changes to our styles should be made to LESS files and not to a CSS file directly. LESS is a syntax that itself is not usable by a browser but is compiled to CSS. It provides niceties that CSS does not offer such as rule nesting, mixins, variables, and arithmetic (calculated values).
Each page may have its own set of specific styles. These page-specific styles are in a page-*.less
file
in the src\Bootstrap\less\theme\
directory.
To compile LESS files:
- Install node: https://nodejs.org/en/download/
- Install Grunt:
npm install -g grunt
- Navigate to
.\src\Bootstrap
- Install NPM dependencies:
npm install
- Update one or more
.less
files in thesrc\Bootstrap\less
directory - Navigate to
.\src\Bootstrap
- Run
grunt
- Create a new
page-X.less
file in thesrc\Bootstrap\less\theme\
directory - Add the new page in
src\Bootstrap\less\theme\all.less
We use jQuery and Knockout.js.
Common JavaScript should be added to src\NuGetGallery\Scripts\gallery\common.js
.
Each page may have its own custom logic. These page-specific scripts are in a page-*.js
file
in the src\NuGetGallery\Scripts\gallery\
directory.