All Projects → joshuaiz → air

joshuaiz / air

Licence: MIT license
A hyper-minimal WordPress starter theme for developers built with Tailwind CSS.

Programming Languages

CSS
56736 projects
PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to air

starter-kit-theme
WordPress starter theme with a modern development stack for launching projects faster and easily
Stars: ✭ 25 (-44.44%)
Mutual labels:  wordpress-development, wordpress-theme, wordpress-starter-theme, wordpress-boilerplate
untheme
A blank WordPress theme for developers.
Stars: ✭ 82 (+82.22%)
Mutual labels:  wordpress-development, wordpress-theme, wordpress-starter-theme, wordpress-boilerplate
Wp Tailwindcss Theme Boilerplate
A minimalist boilerplate for WordPress theme development using Tailwind CSS, SCSS, and Laravel Mix.
Stars: ✭ 199 (+342.22%)
Mutual labels:  wordpress-development, wordpress-theme, wordpress-starter-theme, tailwindcss
Minimal-Blog
Tailwind CSS Starter Template - Minimal Blog
Stars: ✭ 100 (+122.22%)
Mutual labels:  minimal, starter-template, tailwind-css
monsieurpress
A minimal & lightweight WordPress starter theme using gulp
Stars: ✭ 39 (-13.33%)
Mutual labels:  wordpress-development, wordpress-starter-theme, wordpress-boilerplate
Wordpress Bootstrap
Bootstrap in WordPress theme form - Bootstrap 3.3.1
Stars: ✭ 1,494 (+3220%)
Mutual labels:  wordpress-theme, wordpress-starter-theme, wordpress-boilerplate
Sage
WordPress starter theme with a modern development workflow
Stars: ✭ 11,531 (+25524.44%)
Mutual labels:  wordpress-theme, wordpress-starter-theme, tailwindcss
Minimalist-Blog
Tailwind CSS Starter Template - Minimalist Blog
Stars: ✭ 21 (-53.33%)
Mutual labels:  minimal, starter-template, tailwindcss
Air Light
WordPress starter theme - designed to be minimal, lightweight and easy for all kinds of WordPress projects. Public Roadmap: https://favro.com/organization/3b45e73eaf083f68fefef368/c1dd2d4a99d6723904d2e763
Stars: ✭ 285 (+533.33%)
Mutual labels:  wordpress-development, wordpress-theme, wordpress-starter-theme
Wordpress Starter
📦 A starter template for WordPress websites
Stars: ✭ 26 (-42.22%)
Mutual labels:  wordpress-development, starter-template, wordpress-starter-theme
Theme
Tonik is a WordPress Starter Theme which aims to modernize, organize and enhance some aspects of WordPress theme development.
Stars: ✭ 1,197 (+2560%)
Mutual labels:  wordpress-development, wordpress-theme, wordpress-starter-theme
WordPress-UIkit-Starter-Theme
A WordPress starter theme for developers using the frontend framework UIkit
Stars: ✭ 55 (+22.22%)
Mutual labels:  wordpress-development, wordpress-theme, wordpress-starter-theme
Understrap
Understrap is the renowned open-source WordPress starter theme that combines Underscores with Bootstrap. Trusted by more than 100,000 developers.
Stars: ✭ 2,822 (+6171.11%)
Mutual labels:  wordpress-development, wordpress-theme, wordpress-starter-theme
Create React Wptheme
Create modern, React-enabled WordPress themes with a single command.
Stars: ✭ 252 (+460%)
Mutual labels:  wordpress-development, wordpress-theme, wordpress-starter-theme
barebones
React based WordPress Theme, built with create-react-wptheme. This is a starter theme with just the core WordPress functionality.
Stars: ✭ 35 (-22.22%)
Mutual labels:  wordpress-development, wordpress-theme
WPKirk
A WP Bones skeleton Plugin
Stars: ✭ 28 (-37.78%)
Mutual labels:  wordpress-development, wordpress-boilerplate
Rainblur-Landing-Page
Tailwind CSS Starter Template - Rainblur Landing Page (dark)
Stars: ✭ 112 (+148.89%)
Mutual labels:  starter-template, tailwind-css
luxe
Luxe is a WordPress starter theme using a modern workflow and best practices.
Stars: ✭ 22 (-51.11%)
Mutual labels:  wordpress-theme, wordpress-starter-theme
coblocks-theme
WordPress theme for CoBlocks
Stars: ✭ 24 (-46.67%)
Mutual labels:  wordpress-development, wordpress-theme
sage-laravel-mix
🌟 Sage 9 with laravel mix & vuejs
Stars: ✭ 31 (-31.11%)
Mutual labels:  wordpress-theme, wordpress-starter-theme

Air by studio.bio

License Github Last Commit GitHub issues GitHub forks GitHub stars Twitter

A hyper-minimal WordPress starter theme for developers built with Tailwind CSS.

Quickstart

  1. Download or clone into /wp-content/themes/
  2. Run npm install to install the dependencies.
  3. Change the name of the theme directory from air to whatever you want and also change the comment header in style.css to your desired theme name.
  4. Activate the theme in the WordPress admin.
  5. ❤️ Love.

Developing with Air

From the theme's directory, run npm run dev or even better npm run watch which includes browser reloading.

As you update your files, Air will either hot reload or rebuild if new .css files are required.

Visit https://localhost:3000 to view your local site.

Deploying

Run npm run build to generate a production build which uses purgecss to remove any styles from Tailwind CSS that you aren't using in your theme keeping it as lean as possible.

Then upload your production build to your web server or deploy from GitHub. That's it!

Hot Reloading/Browser Refreshing

While laravel-mix has hot reloading built-in, it is a known issue that it doesn't work with Tailwind CSS so we've added Browsersync as a plugin that will reload the local development browser automagically when any PHP files are updated.

To get it working, just change the proxy option in webpack.mix.js to your local development domain:

.webpackConfig({
        plugins: [
            new BrowserSyncPlugin({
                files: "**/*.php",
                proxy: "https://yourdomain.local",
                browser: "google chrome",
                https: true,
                open: false
            })
        ]
    });

The browser will automatically refresh upon a new local build of CSS files when running npm run watch.

Air + Tailwind CSS

Air uses Tailwind CSS which is a utility-first css framework and a whole new way to think about adding styles to your project.

Instead of creating markup, coming up with class names and then adding css styles to those classes in your stylesheets, Tailwind CSS's low-level utility classes are added directly to your HTML to create your designs.

Think of Tailwind CSS like an alphabet that — when combined in beautiful ways — can create rich and complex designs, just like we do with the letters of our English alphabet when combined to form language.

Once you learn Tailwind's classes "alphabet" and how to use it, the possibilities are endless. Yet, by using pre-defined styles as building blocks, you aren't creating everything from scratch.

Still, if you need to do something custom, you can always write your own css just as before. The beauty of Tailwind CSS though is that you will be writing way less css.

The example above is from the Tailwind CSS website and shows a sample component created without any added css styles — everything is done in the HTML using Tailwind's classes. This example even sets responsive breakpoints and their respective styles right in the HTML.

See this on the tailwindcss.com site site →.

How does it work?

Tailwind CSS requires a build process so Air is set up a little differently than most other WordPress themes. If you've used Sass/SCSS with a preprocessor then the process is similar, with some differences that we'll explain in detail.

But don't worry — even if you never used a preprocessor, Webpack or Grunt or Gulp or have no idea what a package.json file is or does, Air makes it easy.

The first thing you might notice is that there are a few files in the theme's root folder that may look unfamiliar. Let's take a look at these and explain what they do.

webpack.mix.js

This file imports mix which is a very cool utility that allows us to use JavaScript libraries and build tools in our WordPress theme (or any kind of project).

The magic happens here:

mix
    .postCss("library/css/theme-style.css", "library/css/style.css")
    .options({
        from: "undefined",
        postCss: [
            require("postcss-import"),
            require("tailwindcss"),
            require("postcss-nested"),
            require("autoprefixer")
        ],
        // more stuffs

Tailwind CSS is a plugin forPostCSS and that's not particularly important other than the fact that mix supports PostCSS out-of-the-box. So all we have to do is require our PostCSS plugins (including Tailwind) and we are good to go.

Here we're telling mix to use PostCSS to use the theme-style.css file to build our style.css file using the options specified.

You don't need to edit this file at all but you can and add your own PostCSS options/plugins or even other JavaScript libraries or plugins (outside of CSS) and extend mix as you see fit!

tailwind.config.js

This file is used to extend Tailwind's defaults as well as add custom defaults for a theme. We've added some default classes and colors for Air but feel free to delete what's there or add your own.

See more info on customizing Tailwind's config.

Build Process

The Tailwind/PostCSS build process is a bit slower than using .scss and preprocessors because whatever classes you use in your .css stylesheets, Tailwind has to scope through all of it's styles and apply them at build time.

For this reason, we've commented out adding the editor and block stylesheets (for the content and Gutenberg editors) to the main build as they add considerable time to the process. Uncomment these when you've made changes and need to add them to the build but then comment them out for your main development workflow.

Still, as you will be adding most of your styles to the markup in .php files, you won't need to rebuild the stylesheets as often as you might think.

What about SCSS?

Our other WordPress starter theme Plate uses modular .scss files and media queries so definitely look at that if you want to use .scss.

We love .scss however with Air and Tailwind CSS, you don't need it! In our webpack.mix.js file above, we are using PostCSS plugins that support imports, nesting, and autoprefixing just like SCSS.

You weren't really using lots of complex Sass mixins, were you? (If so, you still can use .scss and preprocessors with Tailwind...see the docs.)

Here's the key concept:

Most of your styles will be added as classes directly to the theme's HTML

As a result, we're using regular ol' .css files but you can import files and nest selectors just like Sass/SCSS and don't need to worry about browser prefixing — that is all handled at the build step.

Yet really you will be writing less CSS which will speed up your development immensely.

Advanced Options

Coming soon...

Try Air

If you're still skeptical, just give Air + Tailwind CSS a try. The only way to really see the benefits of Tailwind CSS is to dive in and use it. I was skeptical too — but I was hooked after 15 minutes and never looked back.

Granted, Air (and Tailwind CSS) won't be the right fit for every project but at studio.bio we wanted another option for a starter theme for non-headless projects and we love working with Tailwind CSS. Enter Air.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].