/*
Theme Name:   TCN Twentysix
Text Domain:  tcn
Description:  The Contract Network block theme. Replaces Cwicly and the TCN Cwicly Child theme. Core blocks only, with Cwicly's generated CSS carried over so the site looks exactly as it did.
Author:       Biscuit Studios
Author URI:   https://biscuitstudios.com/
Version:      1.0.0
Requires at least: 7.1
Requires PHP: 8.2
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
*/

/*-------------------------------------------------------------------------*/

/* 1. WRAPPERS CORE ADDS THAT CWICLY DID NOT HAVE */

/*-------------------------------------------------------------------------*/

/*
 * Core wraps an image in <figure> and a button in two <div>s. Cwicly printed the bare
 * <img> and <a>. The render filters in inc/render.php move Cwicly's classes onto the
 * <img> and <a> and give the wrappers this class, so they take no part in layout and
 * the page lays out exactly as it did under Cwicly.
 */
.tcn-contents {
	display: contents;
}

/*-------------------------------------------------------------------------*/

/* 2. EDITOR ONLY */

/*-------------------------------------------------------------------------*/

/*
 * In the editor the wrappers keep core's markup, so Cwicly's classes sit on the
 * <figure> and the button wrapper. These rules hand the box to the inner element.
 */
.editor-styles-wrapper .wp-block-image.cc-img > img,
.editor-styles-wrapper .wp-block-image[class*="image-c"] > img {
	width: 100%;
	height: 100%;
	object-fit: inherit;
	object-position: inherit;
	border-radius: inherit;
}
.editor-styles-wrapper .wp-block-button.cc-btn > .wp-block-button__link {
	all: inherit;
	display: inline;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
}
