Canopy Padding — Best Practices

SkillDev tools

Best practices for the Canopy Padding directive. Trigger when applying padding to Canopy components or HTML elements using the Canopy spacing scale in an Angular project.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Canopy Padding — Best Practices skill

What this skill tells your AI

The instructions your AI receives, as published by legal-and-general/canopy in skills/best-practice/spacing-padding/SKILL.md and read by ahel’s review.

This skill provides usage guidance and input reference for the Canopy lgPadding directive from @legal-and-general/canopy.

Apply this skill whenever you add padding to a Canopy component or HTML element.

See also: spacing-margin and spacing-row-gap skills.


Import

import { LgPaddingDirective } from '@legal-and-general/canopy';

Basic Usage

<!-- All sides -->
<lg-card lgPadding="4"></lg-card>

<!-- Bottom only -->
<lg-card lgPaddingBottom="8"></lg-card>

<!-- Horizontal (left and right) -->
<lg-card lgPaddingHorizontal="4"></lg-card>

<!-- Vertical (top and bottom) -->
<lg-card lgPaddingVertical="6"></lg-card>

<!-- Combined: all sides 7, but bottom 9 -->
<lg-card lgPadding="7" lgPaddingBottom="9"></lg-card>

Breakpoint Overrides (NoneAt)

Set padding to none (zero) at specific breakpoints. Available breakpoints: sm, md, lg, xl, xxl.

<lg-card lgPadding="4" lgPaddingNoneAt="sm"></lg-card>
<lg-card lgPaddingRight="5" lgPaddingRightNoneAt="md"></lg-card>
<lg-card lgPaddingVertical="6" lgPaddingVerticalNoneAt="lg"></lg-card>

Inputs

InputTypeDefaultDescription
lgPaddingSpacingVariant | SpacingResponsivenullPadding on all sides.
lgPaddingTopSpacingVariant | SpacingResponsivenullTop padding.
lgPaddingRightSpacingVariant | SpacingResponsivenullRight padding.
lgPaddingBottomSpacingVariant | SpacingResponsivenullBottom padding.
lgPaddingLeftSpacingVariant | SpacingResponsivenullLeft padding.
lgPaddingHorizontalSpacingVariant | SpacingResponsivenullLeft and right padding.
lgPaddingVerticalSpacingVariant | SpacingResponsivenullTop and bottom padding.
lgPaddingNoneAtBreakpoints | Breakpoints[]nullRemove all padding at breakpoint(s).
lgPaddingTopNoneAtBreakpoints | Breakpoints[]nullRemove top padding at breakpoint(s).
lgPaddingRightNoneAtBreakpoints | Breakpoints[]nullRemove right padding at breakpoint(s).
lgPaddingBottomNoneAtBreakpoints | Breakpoints[]nullRemove bottom padding at breakpoint(s).
lgPaddingLeftNoneAtBreakpoints | Breakpoints[]nullRemove left padding at breakpoint(s).
lgPaddingHorizontalNoneAtBreakpoints | Breakpoints[]nullRemove horizontal padding at breakpoint(s).
lgPaddingVerticalNoneAtBreakpoints | Breakpoints[]nullRemove vertical padding at breakpoint(s).

Design Constraints

  • Always use lgPadding directives instead of writing custom CSS padding — this ensures spacing adheres to the Canopy spacing scale.
  • Spacing variant values (none, 112) map to CSS custom properties defined in spacing.scss.

Signals

GitHub stars
23
Forks
46
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
canopy-spacing-padding
Source
github.com/legal-and-general/canopy