Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Add font smoothing + text link styles #220

Merged
merged 5 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
if ( ! function_exists( 'twentytwentytwo_support' ) ) :

/**
* Add support for core block visual styles.
* Styles load in both the editor and the front end.
*
* @link https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#default-block-styles
* Sets up theme defaults and registers support for various WordPress features.
*
* @return void
*/
function twentytwentytwo_support() {

// Add support for block styles.
add_theme_support( 'wp-block-styles' );

// Enqueue editor styles.
add_editor_style( get_template_directory_uri() . '/style.css' );
}
add_action( 'after_setup_theme', 'twentytwentytwo_support' );

Expand Down
31 changes: 31 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,34 @@ Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, feature
Twenty Twenty-Two WordPress Theme, (C) 2021 WordPress.org
Twenty Twenty-Two is distributed under the terms of the GNU GPL.
*/

/*
* Font smoothing.
* This is a niche setting that will not be available via Global Styles.
* https://github.com/WordPress/gutenberg/issues/35934
*/

body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}

/*
* Text link styles.
* Necessary until the following issue is resolved in Gutenberg:
* https://github.com/WordPress/gutenberg/issues/27075
*/

a {
text-decoration-thickness: 1px;
text-underline-offset: 0.25ch;
}

a:hover,
a:focus {
text-decoration-style: dashed;
}

a:active {
text-decoration: none;
}