Skip to content
tacoen edited this page Jun 5, 2014 · 7 revisions

Wordpress theme consisted in 3 part. PHP Code, Scripts, and Styles.

UM base on underscore.me(_s) which are just right amount of lean, well-commented, modern, HTML5 templates. with ultra-minimal CSS and javascripts.

Styles

The most prominent key of themes is style.css (The Styles), which contains (base on _s):

  1. Reset
  2. Typography
  3. Elements
  4. Forms (with Navigations)
  5. Accessibility
  6. Alignments
  7. Clearings
  8. Widgets
  9. Content
  10. Infinite scroll
  11. Media

In UM, we split the style.css into:

  1. Reseting Styles reset.css (1-2)
  2. Wordpress Default(Rebuilding Styles) css/base.css(3,5-11)
  3. Wordpress basic navigations css/nav.css (menus, page-nav, *-nav) (4)
  4. and add our own UM-GUI (also in ultra minimal) css/um-gui-lib.css
  5. The 'style.css'
  6. Optionally 'layout' styles
  7. Optionally 'um-scheme' for colour scheme.
  8. Media Queries

Reset.css

Note: For them you develop many site, Wordpress or non-wordpress site, having a own copies on 'reset.css' will be gracefull instead having it inside style.css.

UM use HTML5 Reset <html5reset.org>, which are learned much from/been inspired by/taken code where offered from:

Wordpress Default

Base on _s style.css, rebuild a basic html typography, forms (using em and rem), and amount of basic wordpress class and id. So your Wordpress will be ready for responsive-design.

So, as Theme Core, UM-Themes shall help you kick-started your theme development.

We merely touch the php code from _s, but added some more PHP functions and tools to it, which still easy to follow.

The navigations is on css/nav.css so it will be easy to design your own menu and navigations styles.

Scripts

UM came with UM-Gui-lib. It's a jQuery and basic html5 apis, Yet, still adapting _s scripts which merged into 'default.js'

To Learn about UM-GUI.js functions: UM-GUI-JS

Media Queries

Since '1.1.4' we extract the sytles into css3 media queries. Um, Yes. It's shall be responsive in design

  1. 'print.css' How your page/post will look when printed
  2. 'medium.css' How your site will look in medium-width-devices(tablet)
  3. 'small.css' How your site will loook in small-width-devices(handheld)

To lean about media queries:

Reduce

UM-Plug came with Minify http://code.google.com/p/minify/, which Combines, minifies JavaScript and CSS files on demand.

We use JSMin.php and CSSmin.php to create a static.css and static.js(also static-foot.js) to reduce payload and number of request. This will be so usefull when your site entering productions stage.

The generated minified scripts and style will be en-queue into WP_header() just like any other default scripts or styles.

Tips

  • Set 1 (>0) in CSS Compression level to evaluate your static/minified css code
  • Don't use @import "file.css" in css, better enqueue them into wp_header

Note

  • CSSmin.php produce error on Wordpress (still in bug hunt), so we use our own css compression functions.

Clone this wiki locally