• Stars
    star
    100
  • Rank 339,444 (Top 7 %)
  • Language
    JavaScript
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Tailwind plugin for WordPress theme developers.

Tailwind/Gutenberg

A Tailwind plugin for WordPress theme developers.

โš ๏ธ 8๏ธโƒฃung! Work-in-progress! PRs welcome. All one or none! Long life and eternal happiness. Wash with Doc Bronners, 18 uses, three times daily! In all we do let us be generous with our commits!

Current modules

  • aspect-ratios.js
  • block-content.js
  • block-cover.js
  • block-embed.js
  • block-image.js
  • block-table.js
  • block-video.js
  • colors.js
  • columns.js
  • figcaption.js
  • group.js
  • typography.js

Contributing

Honestly, thanks! This thing cannot succeed without community support and contributions. ๐Ÿป

Tailwind/Gutenberg is broken into modules to the extent that it can be so as to not wastefully generate classes which aren't utilized.

If submitting a PR:

Do not utilize default theme() keys in your module code

In your module avoid utilizing theme configuration values outside of the theme.gutenberg key.

Example:

  // ๐Ÿšซ Bad
  const cover = ({
    '.wp-block-cover': {
      paddingTop: theme('spacing.2xl'),
    }
  })

  // ๐ŸคŸ๐Ÿฝ Good
  const options = theme('gutenberg.blocks.cover')
  const cover = ({
    '.wp-block-cover': {
      paddingTop: theme('gutenberg.spacing.vertical.default'),
    }
  })
}

The one exception to utilizing theme() is when providing default values in tailwind.config.js, and in that case you should absolutely use it and stick to keys found in the stock tailwind config file.

Do not hardcode property values

Try not to set values directly. Try to source everything from the configuration file.

Example:

  // ๐Ÿšซ Bad
  const cover = ({
    '.wp-block-cover': {
      paddingTop: '2rem',
    }
  })

  // ๐ŸคŸ๐Ÿฝ Good
  const options = theme('gutenberg.blocks.cover')
  const cover = ({
    '.wp-block-cover': {
      paddingTop: options.verticalPadding,
    }
  })
}

Thanks!

More Repositories

1

wp-block-styles-project

The WP Block Editor SCSS motherload
CSS
22
star
2

sage-next

JavaScript
18
star
3

tiny-mde

Markdown for the WordPress Block Editor
JavaScript
18
star
4

BlockCompose

View composer and attribute builder for Sage 10 and WordPress' Project Gutenberg editor.
PHP
18
star
5

site-maintenance-scripts

JavaScript
7
star
6

block-sandbox

Better WordPress block testing for theme & plugin developers.
PHP
7
star
7

wpdb-sync

CLI tool to simplify WordPress data migration workflows
Ruby
7
star
8

docker-rock

No-nonsense Bedrock in a box
Shell
6
star
9

hard-pass

Maintain a hardcoded block blacklist in PHP
PHP
6
star
10

netlify-plugin-discord

Netlify build status notifications in Discord
JavaScript
6
star
11

cpt-block-layout-starter

Simple starting point for a CPT with a fixed layout in the Block Editor
JavaScript
6
star
12

trellis-netdata

5
star
13

laravel-mix-tailwind-emotion

Laravel mix extension that combines the best of Emotion and Tailwind
JavaScript
5
star
14

gutenberg-playground

liberating "playground" from the @wordpress/gutenberg repo ๐Ÿ˜›
CSS
5
star
15

wp-block-glossary

Adds a WordPress block to handle the <dl> element
TypeScript
5
star
16

server-side-rendering

Experimental server-side rendering for Sage 10 applications.
PHP
4
star
17

vanilla-js-graphql-wp-spa

wordpress but with postcss, pug, graphql, tailwind, etc.
JavaScript
3
star
18

statistics

WordPress block for presenting facts & figures.
JavaScript
3
star
19

convio-survival-kit

A PHP Utility to Help Make Convio Suck Less
PHP
3
star
20

bud-plugin-blade-support

@tinypixelco/bud-plugin-blade-support
HTML
3
star
21

geo-json

My personal broke-ass GEO-JSON server
JavaScript
3
star
22

laravel-mix-emotion

Zero-config Laravel Mix extension that enables Emotion styled components.
JavaScript
3
star
23

wp_convio

Convio Plugin For WordPress
PHP
3
star
24

laravel-mix-json-to-sass-map

Laravel Mix extension to convert JSON to Sass map
JavaScript
2
star
25

game-of-life-ts

Conway's game of life in TypeScript
TypeScript
2
star
26

bud-demo-plugin

JavaScript
2
star
27

pocket

A simple symlink utility command.
JavaScript
2
star
28

laravel-mix-astroturf

Laravel Mix extension that allows you to compile CSS-in-JSS pre-runtime
JavaScript
1
star
29

roots-dev-env

JavaScript
1
star
30

ueg_leaflet

Leaflet maps and geodata for Save Darfur / United to End Genocide
PHP
1
star
31

bundlers-comparison

CSS
1
star
32

wordpress-5-resources

Documentation and resource compilation for WordPress 5 Block Development
CSS
1
star