# code-snippets/4.0.0-beta.2/css/menu.scss

Code Snippets, version 4.0.0-beta.2. 60 lines.

- Page: https://pluginprobe.com/plugins/code-snippets/4.0.0-beta.2/code/css/menu.scss
- Raw: https://pluginprobe.com/plugins/code-snippets/4.0.0-beta.2/raw/css/menu.scss
- Modified: 2026-09-22T07:44:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-snippets/4.0.0-beta.2/code/css/menu.scss#L10-L20`.

```scss
@use 'common/theme';

#adminmenu {
	.toplevel_page_snippets div.wp-menu-image::before {
		content: '';
		mask-image: url('../assets/menu-icon.svg');
		mask-repeat: no-repeat;
		mask-position: center;
		background-color: currentcolor;
	}

	.code-snippets-upgrade-button {
		color: #fff;
		background-color: var(--cs-color-secondary);
		border: none;

		// WP 7.0 restyles `.button`/`.button-primary` with wider padding, a 2px radius and a
		// 40px min-height; pin these (independent of the plugin control tokens, which are
		// sized for page content rather than the admin menu) so the pill keeps its compact
		// dimensions and stays aligned with the surrounding submenu items across WP versions.
		border-radius: 5px;
		padding-block: 0;
		padding-inline: 10px;
		min-block-size: 30px;
		block-size: auto;
		text-align: center;
		font-weight: bold;
		transition: background-color .1s linear;
		white-space: break-spaces;
		line-height: inherit;
		display: flex;
		justify-content: center;
		align-items: center;

		@media (prefers-reduced-motion: reduce) {
			transition-duration: 0.01s;
		}

		&:hover,
		&:focus {
			background-color: var(--cs-color-primary-hover);
		}

		.dashicons {
			vertical-align: text-bottom;
			color: inherit;
			font-size: 16px;
			padding-block-start: 2px;

			// WP 7.0's taller button line-height (≈38px) leaks onto the icon and pushes it out
			// of alignment; reset it so the glyph stays centred within the flex pill.
			line-height: 1;
		}
	}

	.wp-submenu a[href='admin.php?page=code_snippets_upgrade']:hover {
		box-shadow: none;
	}
}

```
