Some Variables - CSS
| | | |

Talking WPRig and Theming in the Gutenberg Era with Morten Rand-Hendricksen

Some Variables - CSS

This month we’re taking a look at the WPRig WordPress framework from its developer Morten Rand-Hendricksen. This will be a live remote presentation with Q&A as time allows. If you want to learn more ahead of the meetup, follow this link https://wprig.io/

“Pave the cowpath” – WordPress could be the thing that paves the cowpath for the modern web, but it isn’t.

Underscores used to be the starting theme do build off of, but there was no real standard, and modern, build process.

Build Process

  • Modern JavaScript
  • Modern CSS (customer properties, etc)
  • WordPress Coding Standards
  • Code Linting for PHP, JS, CSS
  • Automatic internationalization
  • Code and asset optimization

Starter Theme

  • Accessible
  • Modern best-practices
  • Styled out of the box
  • Minimum required files
  • Optional templates
  • Progressive features
  • Gutenberg

New in WP Rig 2.0

  • Full rebuild of Gulp process and scripts
  • All-in on OO PHP
  • CSS custom properties and components
  • PostCSS everything
  • No more SASS
    • SASS is to CSS like jQuery was to JavaScript
    • CSS now includes the things that SASS used to provide

Where Do I Get It?

Get it from GtiHub using the v2.0 branch

The WP Rig Philosophy

WP Rig does the heavy lifting so you can focus on what you do best: Build themes using modern PHP, CSS, and JavaScript.

Using WP Rig 2.0

  1. Setup you regular WordPress dev environment.
  2. Clone/copy the WP Rig into the themes folder
  3. Check defaults config/config.default.json
  4. Add custom setting as necessary config/config.json
  5. In terminal, run npm run rig-init
  6. In terminal, run npm run dev
  7. Start developing

Requirements

  • npm
  • composer

Configuration

  • config.default.json

SSL Support

  • npm to generate the cert
  • setup config.json and set https: true

PostCSS

  • Allows you to write future CSS that will then get converted to today’s CSS
  • Can configure your level of feature support
    • Custom media queries
    • Custom properties
    • Nesting rules

Debugging

  • Support to prevent minification/optimization to allow development debugging

Live Editing/Previewing

What Wp Rig Does: PHP

  • Watches PHP files
  • Checking PHP against WP coding standards

What Wp Rig Does: CSS

  • Watches CSS files
  • Processes CSS through PostCSS
  • Lints CSS to WP Coding Standards
  • Integrate with editor
  • Minifies files for production release

What Wp Rig Does: JavaScript

  • Watches JS files
  • Lints JS to WP Coding Standards
  • Integrate with editor
  • Minifies files for production release

Starter Theme Features

  • Accessible down-down menus
  • Modern CSS layout
  • Modern JS loading
  • Optimized Google fonts
  • Lazy-loading images
  • AMP-ready
  • Modular in-body CSS loading
  • Plug-n-Play template hierarchy

Demo

  • Make your changes in the config.json not the config.default.json
  • CSS files are broke out into components/modules and only included when needed.

Similar Posts

  • WordCamp GR 2017 – Plugins: The WP Box of Chocolates – Stacy Vanden Heuvel

    Stacy Vanden Heuvel – http://www.mtnwebs.net/ (blog) http://mtnwebs.com/ What are they? Premanufactured code that adds function and features. 51,000+ plugins available today. Dropped into a site. There is a plugin or everything. Why does anyone care? Makes website building easier. How do you choose? How many active installs? Does it have reputable developers? When was it last updated? What are the ratings? – need to take these with a grain of salt Is it compatible with the current release? Does it fit with exactly what you need it to do? Plugin Examples WP-Polls Auto Terms of Service and Privacy Policy – doesn’t support translations WPFront Scroll – scroll-to-top button Hummingbird – page speed optimization, gives you an optimization report WP Smush – image optimization, optimizes as you upload,…
  • Back to Blogging

    So I follow a lot of WordPress folks, given that I manage multiple WordPress sites and have been apart of multiple WordPress development efforts. Aaron Jorbin recently blogged about a few simple ways to blog more. Here’s my first pre-2017 blog post, taking Aaron’s advice. Peru, Illinois, United States of America
  • / /

    Life’s Lows…

    No worries, things are good I just seem to be suffering from some social withdrawal. That being said God is working on my patience, thank goodness. I’m fighting my mind daily, but it’s been those times God has given me the ability to just give it to Him. Something that is interesting, I’ve been have some interesting dreams. These dreams have been about the same general thing. It seems like these have been dreams that God has brought to mind to reveal something to me that I didn’t realize was there. Basically I’ve had some recentment about something. I’ve asked for forgiveness for this. Something else that God has shown me is why I’ve not been content over the years staying in one place. I…
  • / /

    If Money Were No Object, What I’d Choose For My Next Developer Machine

    These days I’m sporting an HP Chromebook 13 G1 which has mostly been a good machine. Seems like even with 8GB of RAM I still end up with some freeze ups when I’m plugging in or unplugging my USB-C dock. It’s rather frustrating but fortunately Google Chrome is designed to recognize abrupt closes and can recover. I used to run in developer mode but now since I can run Android apps I’m using Termux with a Linux shell and Neovim as my IDE. I’m still working out the best setup for Neovim but so far it’s serving me well. So back to the premise of this post and the main image. If I had the finances to support it I’d want my next machine to…
  • WordCamp US 2019 – How the WordPress Community Can Embrace the Next Generation (Talk + Panel)

    Talk – Olivia Bisset lemonadecode.com/WCUS If WordPress doesn’t become attractive to the next generation it will become a relic. WordCamps Don’t use the word kids, use words like teens and students Make regular tracks attractive to to young people Market to young people, don’t make it all about old people Meetups Don’t use foul language, make it family friendly Parents Take your kids to events Support your kids to see talks that are relevant for them Teachers WordPress is a good publishing tool for kids Writing content helps students develop their writing skills Have an “Hour of Code” Block Editor Students liked the Block Editor Panel Dina Butcher, Ema DeRosia, Emily Lema, Sophie DeRosia, Olivia Bisset, Natalie Bourn Kids are using the WordPress platform to…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)