This is a quickstart toolkit based on Scalable and Modular Architecture for CSS (SMACSS), Atomic Design for Sass (SCSS) projects, and Sass-Starter (By Mina Markham). This toolkit has been simplified and repurposed for use with WordPress development.
- If needed, install
node
andnpm
(Node Package Manager).
- If needed, install
gulp
withnpm install gulp -g
. - Clone this repo with
git clone https://github.com/UCF/BS-officeplus-theme
or download the zip. - In terminal,
cd
to the folder containing your project. Alternatively, you can typecd
and drag the location of the folder into your terminal and hit enter (on Macs). - In terminal, type
npm install
. If (and only if)npm install
isn't working, trysudo npm install
. This should install all dependencies. - In terminal, enter
gulp
. - Your browser should open at
http://localhost:3000
. You can access this same page on any device on the same wifi network and they'll see whats on your screen. It'll even sync scrolls and clicks! - Edit your code inside of the
src
folder. - Your complied and minified css, html, and javascript files will be created and updated in
dist/
. Never edit files within thedist/
folder, as it gets deleted frequently. - Keep
gulp
running while you're making changes. When you want to stop the gulp task, hitctrl + C
.
For theming: add separate file (theme.scss) insrc/scss/themes/
, override the default $theme
variable, and run gulp themes
.
Development Mode
This will give you file watching, auto-rebuild, and CSS injection.
$ gulp
All Wordpress theme modifications are added to the partials folders
If you are modifying a plugin's CSS, eg. GravityForms, simply:
- Add a _gforms.scss file to partials
- Add the import to partials/_index.scss
- And head the _gforms.scss file with the appropriate selector
- The Dev branch is automatically deployed to the Office Plus Dev environment
- The Master branch is automatically deployed to the Office Plus QA environment
- Deployment to production is done manually via Jenkins using release versions
- Be sure to update the style.css with the version on new releases.
- Sass linting (based on default config)
- Autoprefixer configuration
- SMACSS and Atomic Design-based folder structure
px
toem
,px
torem
and other useful functions.- Mixins for inlining media queries.
- Useful CSS helper classes.
- Default print styles, performance optimized.
- "Delete-key friendly." Easy to strip out parts you don't need.
"colors": "^1.1.2",
"del": "^2.0.2",
"gulp-autoprefixer": "^2.1.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^1.3.2",
"gulp-sass-lint": "1.0.1",
"gulp-sourcemaps": "^1.5.2",
"sassdoc": "^2.1.15",
"vinyl-paths": "^2.0.0"
-
styles
-
sass-lint
-
watch
-
default
- styles
- watch
-
build
- styles
βββ .gitignore
βββ .sass-lint.yml
βββ .travis.yml
βββ lib
βΒ Β βββ scss
βΒ Β βββ atoms
βΒ Β βΒ Β βββ _index.scss
βΒ Β βββ base
βΒ Β βΒ Β βββ _base.scss
βΒ Β βΒ Β βββ _index.scss
βΒ Β βββ layout
βΒ Β βΒ Β βββ _index.scss
βΒ Β βββ libs
βΒ Β βΒ Β βββ _index.scss
βΒ Β βΒ Β βββ _normalize.scss
βΒ Β βΒ Β βββ _pesticide.scss
βΒ Β βββ molecules
βΒ Β βΒ Β βββ _index.scss
βΒ Β βββ organisms
βΒ Β βΒ Β βββ _index.scss
βΒ Β βββ overrides
βΒ Β βΒ Β βββ _index.scss
βΒ Β βββ partials
βΒ Β βΒ Β βββ _home.scss
βΒ Β βΒ Β βββ _index.scss
βΒ Β βββ states
βΒ Β βΒ Β βββ _index.scss
βΒ Β βΒ Β βββ _print.scss
βΒ Β βββ themes
βΒ Β βΒ Β βββ rebeccapurple.scss
βΒ Β βββ utilities
βΒ Β βΒ Β βββ _colors.scss
βΒ Β βΒ Β βββ _config.scss
βΒ Β βΒ Β βββ _fonts.scss
βΒ Β βΒ Β βββ _functions.scss
βΒ Β βΒ Β βββ _index.scss
βΒ Β βΒ Β βββ _mixins.scss
βΒ Β β βββ _typography.scss
βΒ Β βββ styles.scss
βΒ Β βββ styles.css
βΒ Β βββ _shame.scss
βββ gulpfile.js
βββ README.md
βββ package.json
This toolkit is based on the work of the following fine people & projects.