What?
What?
What?
What?
What?
What?
Why?
Why?
Why?
Why?
Why?
How?
How?
How?
How?
How?
How?
How?
How?
How?
How?
How?
_s
How?
How
How?
What I Changed
**/.sass-cache
**/.sass-cache/*
.sass-cache
.sass-cache/*
.DS_Store
_/img/.DS_Store
# ignore Editor files
*.sublime-project
*.sublime-workspace
*.komodoproject
How?
How?
How?
How?
Styling Logic from Drupal Themes/Developers
/* Setting base font size as 10 for easy maths */
$base-font-size: 10px; /* The font size set on the root html element */
$base-line-height: 24px; /* The base line height */
/* Font stacks */
$times: Times, "Times New Roman", Georgia, serif;
$arial: Arial, Helvetica, sans-serif;
$courier: "Courier New", monospace, sans-serif;
/* Font stack variables */
$font: $arial; /* The font family set on the html element. */
$font-code: $courier;
$font-pre: $courier;
$serif: $times;
$sans-serif: $arial;
$monospace: $courier;
/* Font weights */
$light: 200;
$regular: 400;
$bold: 700;
$black: 900;
How?
How?
How?
How?
How?
How?
How?
How?
require 'compass'
http_path = "/"
css_dir = "/"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"
output_style = :expanded
# or :nested or :compact or :compressed
relative_assets = true
environment = :development
#environment = :production
output_style = (environment == :development) ? :expanded : :compressed
relative_assets = true
sass_options = (environment == :development) ? {:debug_info => true} : {}
sourcemap = true
line_comments = true
How?
Data from NPM Trends.
How?
Gutenberg-Friendly
# General Structure ## Code ## Cover ## Embeds ## Gallery ## Group ## Image ## Latest Posts ## List ## More ## Pullquote ## Quote ## Separator ## Table ## Video # Additional Theme Styles ## Color Palette
Gutenberg-Friendly
/* Add core block visual style support */
add_theme_support( 'wp-block-styles' );
/* Add full and wide align images */
add_theme_support( 'align-wide' );
/* Add responsive embed support */
add_theme_support( 'responsive-embeds' );
Gutenberg-Friendly
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'Raspberry', 'beth2' ),
'slug' => 'raspberry',
'color' => '#ca0164',
),
array(
'name' => __( 'Dark Gray', 'beth2' ),
'slug' => 'dark-gray',
'color' => '#444',
),
) );
Gutenberg-Friendly
.has-raspberry-color {
color: #CA0164;
}
.has-raspberry-background-color {
background-color: #CA0164;
}
.has-dark-gray-color {
color: #444;
}
.has-dark-gray-background-color {
background-color: #444;
}
Gutenberg-Friendly
add_theme_support( 'editor-font-sizes', array(
array(
'name' => __( 'Small', 'beth2' ),
'size' => 12,
'slug' => 'small'
),
array(
'name' => __( 'Normal', 'beth2' ),
'size' => 16,
'slug' => 'normal'
),
array(
'name' => __( 'Large', 'beth2' ),
'size' => 36,
'slug' => 'large'
),
array(
'name' => __( 'Huge', 'beth2' ),
'size' => 50,
'slug' => 'huge'
)
) );
Gutenberg-Friendly
.has-huge-font-size {
font-size: 5rem;
}
.has-large-font-size {
font-size: 3.6rem;
}
.has-regular-font-size {
font-size: 1.6rem;
}
.has-small-font-size {
font-size: 1.2rem;
}
Gutenberg-Friendly
/* Disable custom colors */
add_theme_support( 'disable-custom-colors' );
/* Disable custom font sizes */
add_theme_support('disable-custom-font-sizes');
Gutenberg-Friendly
add_editor_style( 'style-editor.css' );
What next?
What next?
What next?
What next?
What next?
Do I need a starter js/editor.js file?
wp.domReady( () => {
wp.blocks.unregisterBlockStyle( 'core/button', 'default' );
wp.blocks.unregisterBlockStyle( 'core/button', 'outline' );
wp.blocks.unregisterBlockStyle( 'core/button', 'squared' );
wp.blocks.registerBlockStyle( 'core/button', {
name: 'cta',
label: 'Call to Action',
isDefault: true,
} );
wp.blocks.registerBlockStyle( 'core/button', {
name: 'sign-up',
label: 'Sign Up',
} );
wp.blocks.registerBlockStyle( 'core/button', {
name: 'see-more-link',
label: 'See More Link',
} );
} );