Your IP : 216.73.216.215


Current Path : /home/flapst5/ekmtoronto.com/wp-content/plugins/code-snippets/css/manage/
Upload File :
Current File : /home/flapst5/ekmtoronto.com/wp-content/plugins/code-snippets/css/manage/_snippets-table.scss

@use '../common/badges';
@use '../common/list-table';
@use '../common/theme';

.column-name,
.column-type {
	.dashicons {
		font-size: 16px;
		inline-size: 16px;
		block-size: 16px;
		vertical-align: middle;
	}

	.dashicons-clock {
		vertical-align: middle;
	}
}

// `.wp-list-table` prefix keeps this above WP 7.0's 40px control height so the boxed
// priority field stays 30px tall (below the 38px control token, which would stretch the
// table rows) and vertically aligned with the rest of the row.
.wp-list-table .priority-column input {
	appearance: none;
	background: #fff;
	border: 1px solid theme.$control-border;
	border-radius: 5px;
	box-shadow: none;
	box-sizing: border-box;
	min-block-size: 30px;
	block-size: 30px;
	inline-size: 4em;

	// Pin the box model so padding/margins/line-height match WP 6.9 regardless of WP 7.0's
	// taller default control metrics; this keeps the value aligned in both the resting and
	// hovered (native spinner) states.
	padding-block: 0;
	padding-inline: 8px;
	margin-block: 0;
	margin-inline: 1px;
	line-height: 2;
	color: #2c3337;
	text-align: center;

	&:disabled {
		color: inherit;
	}

	&:hover, &:focus, &:active {
		color: #000;
		background-color: rgb(0 0 0 / 10%);
		border-radius: 6px;
		appearance: unset;

		&:disabled {
			color: inherit;
			background-color: transparent;
		}
	}
}

.wp-list-table .is-expanded td.column-activate.activate {
	/* fix for mobile layout */
	display: table-cell !important;
}

.snippets-card-grid {
	// Three equal-height cards per row; descriptions are clamped so height
	// stays uniform regardless of text length. The compound selector wins
	// over the base .code-snippets-cards auto-fill column rule, which is
	// emitted later in the compiled stylesheet.
	// minmax(0, 1fr) lets tracks shrink below their content's min-content
	// width (wide footer button rows), which plain 1fr tracks cannot,
	// preventing the grid from overflowing the page horizontally.
	&.code-snippets-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));

		@media (width <= 1100px) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}

		@media (width <= 782px) {
			grid-template-columns: minmax(0, 1fr);
		}
	}

	.code-snippets-card {
		min-inline-size: 0;
	}

	// Reveal the bulk-select checkbox on hover or keyboard focus, and keep
	// every checkbox visible while any card in the grid is selected so an
	// in-progress selection is never hidden.
	.snippet-card-select {
		opacity: 0;
		transition: opacity 0.15s ease;

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

	.snippet-card-select:checked,
	&.has-selection .snippet-card-select,
	.code-snippets-card:hover .snippet-card-select,
	.code-snippets-card:focus-within .snippet-card-select {
		opacity: 1;
	}

	// Card body bands: header row, meta row, then a separated description.
	.card-inner {
		display: flex;
		flex-flow: column;
		gap: 16px;
	}

	.snippet-card-header {
		display: flex;
		align-items: center;
		gap: 10px;

		// Keep header content clear of the absolutely-positioned selection checkbox.
		padding-inline-end: 32px;

		> a {
			@include badges.badge-link;
		}

		h3 {
			margin: 0;
			font-size: 18px;
			font-weight: 700;
			line-height: 1.5;

			// Let the heading shrink inside the flex row so long names
			// truncate instead of pushing the header icons out of the card.
			min-inline-size: 0;

			.snippet-name {
				display: block;
				color: theme.$accent;
				text-decoration: none;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
		}

		.extra-icons:empty {
			display: none;
		}

		// The accent pill styling lives in common/_switch.scss; keep the
		// switch from shrinking inside the flex card header.
		input[type='checkbox'].switch {
			flex-shrink: 0;
		}
	}

	.snippet-card-meta {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 16px;
		font-size: 14px;
		line-height: 1.5;

		.snippet-card-tags-label {
			color: #646970;
		}

		.snippet-card-tags a {
			color: theme.$accent;
			text-decoration: none;
		}

		.snippet-card-modified {
			color: var(--cs-color-text-muted);
		}

		&.has-tags .snippet-card-modified {
			margin-inline-start: auto;
		}
	}

	.snippet-description-content {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
		font-size: 14px;
		line-height: 1.5;
		color: #646970;
		border-block-start: 1px solid #dcdcde;
		padding-block-start: 16px;
	}

	// Align the selection checkbox with the taller card header row.
	.snippet-card-corner {
		inset-block-start: 28px;
	}

	.code-snippets-card footer {
		.button {
			font-size: 14px;
			line-height: 2.5714;
			border-radius: 5px;
		}

		.button:not(.button-primary) {
			background: transparent;
		}
	}

	.kebab-menu-priority {
		justify-content: space-between;

		// Balances the shorter input so the row matches the height of the menu
		// items above and below it.
		padding-block: 5px;

		input.snippet-priority {
			inline-size: 52px;
			block-size: 30px;

			// WordPress sizes number inputs with a min-height, which would
			// otherwise win over the height set here.
			min-block-size: 0;
			box-sizing: border-box;
			margin: 0;
			padding-block: 0;
			padding-inline: 4px;
			border: 1px solid #e2e2e4;
			border-radius: 4px;
			text-align: center;
			color: #2c3337;
		}
	}
}

// Shared table-navigation layout for both snippet views and both toolbars:
// bulk actions, select all, tag filter and search on the left, with the item
// count, pagination and view toggle pinned to the far end of the row. The
// bottom toolbar repeats only the bulk actions and pagination group.
.snippets-list-view .tablenav {
	block-size: auto;
	margin-block-end: 16px;
}

.snippets-search-subtitle {
	margin-block: 0 12px;
	font-size: 14px;
	font-style: italic;
	color: #646970;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1em;
}

// Keep every table row the same height by clamping the description cell
// to two lines, matching the two-line name + row-actions column.
.snippets-list-view .wp-list-table td.column-desc .snippet-description-content {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}