Skip to content

Instantly share code, notes, and snippets.

View bgardner's full-sized avatar

Brian Gardner bgardner

View GitHub Profile
@bgardner
bgardner / theme.json
Created September 3, 2021 12:45
Responsive Custom Font Sizes in the Frost Theme for WordPress.
{
"name": "48px",
"slug": "max-48",
"size": "clamp(30px, 4vw, 48px)"
},
{
"name": "60px",
"slug": "max-60",
"size": "clamp(36px, 5vw, 60px)"
},
@bgardner
bgardner / theme.json
Created September 3, 2021 12:43
Custom Font Sizes in the Frost Theme for WordPress.
}
"name": "Tiny",
"slug": "tiny",
"size": "16px"
},
{
"name": "Small",
"slug": "small",
"size": "18px"
},
@bgardner
bgardner / theme.json
Last active August 23, 2021 14:00
Define Custom Gradient in the Frost Theme for WordPress.
{
"version": 1,
"settings": {
"color": {
"customGradient": true,
"gradients": [
{
"name": "Fuchsia to Deep Purple",
"gradient": "fuchsia-to-deep-purple"
}
@bgardner
bgardner / theme.json
Created August 18, 2021 13:46
Define Primary Font in the Frost Theme for WordPress.
"custom": {
"fontFamily": {
"primary": "'Jost', sans-serif",
"monospace": "monospace"
},
@bgardner
bgardner / functions.php
Last active August 19, 2021 16:03
Enqueue Google Fonts in Block Editor in the Frost Theme for WordPress.
// Enqueue Google Fonts in block editor.
add_action( 'enqueue_block_editor_assets', 'frost_enqueue_google_fonts_editor' );
function frost_enqueue_google_fonts_editor() {
wp_enqueue_style(
CHILD_THEME_HANDLE . '-editor-google-fonts',
'//fonts.googleapis.com/css2?family=Jost:wght@360;480&display=swap',
array(),
CHILD_THEME_VERSION
);
@bgardner
bgardner / functions.php
Last active August 19, 2021 16:03
Enqueue Google Fonts in the Frost Theme for WordPress.
// Enqueue Google Fonts.
add_action( 'wp_enqueue_scripts', 'frost_enqueue_google_fonts' );
function frost_enqueue_google_fonts() {
wp_enqueue_style(
CHILD_THEME_HANDLE . '-google-fonts',
'//fonts.googleapis.com/css2?family=Jost:wght@360;480&display=swap',
array(),
CHILD_THEME_VERSION
);